Class: ChannelImage
| Defined in: | lib/psd/channel_image.coffee |
| Inherits: | Image |
Overview
Represents an image for a single layer, which differs slightly in format from the full size preview image.
The full preview at the end of the PSD document has the same compression for all channels, whereas layer images define the compression per color channel. The dimensions can also differ per channel if we're parsing mask data (channel ID < -1).
Instance Method Summary
- # (void) skip() Skip parsing this image by jumping to the end of the data.
- # (void) width() The width of the image.
- # (void) height() The height of the image.
- # (void) channels() The number of color channels in the image.
- # (void) parse() Parse the image data.
- # (void) parseImageData() Private
Inherited Method Summary
Methods inherited from
Image
#setChannelsInfo #calculateLength #parse #parseCompression #parseImageData #processImageData
Constructor Details
#
(void)
constructor(file, header, layer)
Creates a new ChannelImage.
Instance Method Details
#
(void)
skip()
Skip parsing this image by jumping to the end of the data.
#
(void)
width()
The width of the image.
#
(void)
height()
The height of the image.
#
(void)
channels()
The number of color channels in the image.
#
(void)
parse()
Parse the image data. The resulting image data will be formatted to match the Javascript
Canvas color format, e.g. [R, G, B, A, R, G, B, A].
#
(void)
parseImageData()
Private