public class ThumbnailResource extends ResourceBlock
The thumbnail resource block.
ResourceBlock.ResourceBlockState
RESOUCE_BLOCK_SIGNATURE
Constructor and Description |
---|
ThumbnailResource()
Initializes a new instance of the
ThumbnailResource class. |
Modifier and Type | Method and Description |
---|---|
short |
getBitsPixel()
Gets the bits pixel.
|
int |
getDataSize()
Gets the resource data size in bytes.
|
int |
getFormat()
Gets the thumbnail data format.
|
int |
getHeight()
Gets the height of thumbnail in pixels.
|
JpegOptions |
getJpegOptions()
Gets the JPEG options.
|
int |
getMinimalVersion()
Gets the minimal required psd version.
|
short |
getPlanesCount()
Gets the planes count.
|
int |
getSizeAfterCompression()
Gets the size after compression.
|
int[] |
getThumbnailArgb32Data()
Gets the 32-bit ARGB thumbnail data.
|
Color[] |
getThumbnailData()
Gets the thumbnail data.
|
int |
getTotalSize()
Gets the total data size.
|
int |
getWidth()
Gets the width of thumbnail in pixels.
|
int |
getWidthBytes()
Gets the row width in bytes.
|
void |
setBitsPixel(short value)
Sets the bits pixel.
|
void |
setFormat(int value)
Sets the thumbnail data format.
|
void |
setHeight(int value)
Sets the height of thumbnail in pixels.
|
void |
setJpegOptions(JpegOptions value)
Sets the JPEG options.
|
void |
setPlanesCount(short value)
Sets the planes count.
|
void |
setThumbnailArgb32Data(int[] value)
Sets the 32-bit ARGB thumbnail data.
|
void |
setThumbnailData(Color[] value)
Sets the thumbnail data.
|
void |
setWidth(int value)
Sets the width of thumbnail in pixels.
|
void |
validateValues()
Validates the resource values.
|
getID, getName, getSignature, getSize, save, setID, setName
public ThumbnailResource()
Initializes a new instance of the ThumbnailResource
class.
public JpegOptions getJpegOptions()
Gets the JPEG options. Suitable when thumbnail resource is saved into JPEG file format only. This option has no effect when RAW format is defined.
public void setJpegOptions(JpegOptions value)
Sets the JPEG options. Suitable when thumbnail resource is saved into JPEG file format only. This option has no effect when RAW format is defined.
value
- The JPEG options.public int getFormat()
Gets the thumbnail data format.
public void setFormat(int value)
Sets the thumbnail data format.
value
- The thumbnail data format.public int getWidth()
Gets the width of thumbnail in pixels.
public void setWidth(int value)
Sets the width of thumbnail in pixels.
value
- The thumbnail width.public int getHeight()
Gets the height of thumbnail in pixels.
public void setHeight(int value)
Sets the height of thumbnail in pixels.
value
- The thumbnail height.public int getWidthBytes()
Gets the row width in bytes.
public int getTotalSize()
Gets the total data size.
public int getSizeAfterCompression()
Gets the size after compression. Used for consistency check.
public short getBitsPixel()
Gets the bits pixel.
public void setBitsPixel(short value)
Sets the bits pixel.
value
- The thumbnail bits pixel.public short getPlanesCount()
Gets the planes count.
public void setPlanesCount(short value)
Sets the planes count.
value
- The thumbnail planes count.public int[] getThumbnailArgb32Data()
Gets the 32-bit ARGB thumbnail data.
public void setThumbnailArgb32Data(int[] value)
Sets the 32-bit ARGB thumbnail data.
value
- The 32-bit ARGB thumbnail data.public Color[] getThumbnailData()
Gets the thumbnail data.
public void setThumbnailData(Color[] value)
Sets the thumbnail data.
value
- The thumbnail data.public int getDataSize()
Gets the resource data size in bytes.
getDataSize
in class ResourceBlock
public int getMinimalVersion()
Gets the minimal required psd version.
getMinimalVersion
in class ResourceBlock
public void validateValues()
Validates the resource values.
validateValues
in class ResourceBlock