Class: PSD::Header
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- PSD::Header
- Defined in:
- lib/psd/header.rb
Overview
Describes the Header for the PSD file, which is the first section of the file.
Constant Summary collapse
- MODES =
All of the color modes are stored internally as a short from 0-15. This is a mapping of that value to a human-readable name.
[ 'Bitmap', 'GrayScale', 'IndexedColor', 'RGBColor', 'CMYKColor', 'HSLColor', 'HSBColor', 'Multichannel', 'Duotone', 'LabColor', 'Gray16', 'RGB48', 'Lab48', 'CMYK64', 'DeepMultichannel', 'Duotone16' ]
Instance Method Summary collapse
-
#height ⇒ Object
Height of the entire document in pixels.
-
#mode_name ⇒ Object
Get the human-readable color mode name.
-
#width ⇒ Object
Width of the entire document in pixels.
Instance Method Details
#height ⇒ Object
Height of the entire document in pixels.
57 58 59 |
# File 'lib/psd/header.rb', line 57 def height rows end |
#mode_name ⇒ Object
Get the human-readable color mode name.
43 44 45 46 47 48 49 |
# File 'lib/psd/header.rb', line 43 def mode_name if mode >= 0 && mode <= 15 MODES[mode] else "(#{mode})" end end |
#width ⇒ Object
Width of the entire document in pixels.
52 53 54 |
# File 'lib/psd/header.rb', line 52 def width cols end |