Class: Rixmap::Format::PNG::Chunk::IHDRChunk
- Defined in:
- lib/rixmap/format/png/chunk.rb
Overview
IHDRイメージヘッダチャンク.
Constant Summary collapse
- TYPE =
IHDRチャンクタイプ
"IHDR"
- LAYOUT =
pack用IHDRデータレイアウト
"N2C5"
Instance Attribute Summary collapse
-
#colortype ⇒ Object
Returns the value of attribute colortype.
-
#compress ⇒ Object
Returns the value of attribute compress.
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#height ⇒ Object
Returns the value of attribute height.
-
#interlace ⇒ Object
Returns the value of attribute interlace.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width = 0, height = 0, depth = 0, colortype = COLORTYPE_TRUECOLOR, compress = COMPRESSION_DEFLATE, filter = FILTER_ADAPTIVE, interlace = INTERLACE_NONE) ⇒ IHDRChunk
constructor
A new instance of IHDRChunk.
- #pack ⇒ Object
- #unpack ⇒ Object
Methods inherited from BaseChunk
#copysafe?, #data, #data=, #optional?, #private?, #standard?, #type
Constructor Details
#initialize(width = 0, height = 0, depth = 0, colortype = COLORTYPE_TRUECOLOR, compress = COMPRESSION_DEFLATE, filter = FILTER_ADAPTIVE, interlace = INTERLACE_NONE) ⇒ IHDRChunk
Returns a new instance of IHDRChunk.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/rixmap/format/png/chunk.rb', line 138 def initialize(width = 0, height = 0, depth = 0, colortype = COLORTYPE_TRUECOLOR, compress = COMPRESSION_DEFLATE, filter = FILTER_ADAPTIVE, interlace = INTERLACE_NONE) @width = width @height = height @depth = depth @colortype = colortype @compress = compress @filter = filter @interlace = interlace super(IHDRChunk::TYPE) end |
Instance Attribute Details
#colortype ⇒ Object
Returns the value of attribute colortype.
133 134 135 |
# File 'lib/rixmap/format/png/chunk.rb', line 133 def colortype @colortype end |
#compress ⇒ Object
Returns the value of attribute compress.
134 135 136 |
# File 'lib/rixmap/format/png/chunk.rb', line 134 def compress @compress end |
#depth ⇒ Object
Returns the value of attribute depth.
132 133 134 |
# File 'lib/rixmap/format/png/chunk.rb', line 132 def depth @depth end |
#filter ⇒ Object
Returns the value of attribute filter.
135 136 137 |
# File 'lib/rixmap/format/png/chunk.rb', line 135 def filter @filter end |
#height ⇒ Object
Returns the value of attribute height.
131 132 133 |
# File 'lib/rixmap/format/png/chunk.rb', line 131 def height @height end |
#interlace ⇒ Object
Returns the value of attribute interlace.
136 137 138 |
# File 'lib/rixmap/format/png/chunk.rb', line 136 def interlace @interlace end |
#width ⇒ Object
Returns the value of attribute width.
130 131 132 |
# File 'lib/rixmap/format/png/chunk.rb', line 130 def width @width end |