public class TiffImage extends RasterImage
The tiff image.
Constructor and Description |
---|
TiffImage()
Initializes a new instance of the
TiffImage class. |
TiffImage(StreamContainer readerStream)
Initializes a new instance of the
TiffImage class. |
TiffImage(TiffFrame frame)
Initializes a new instance of the
TiffImage class. |
Modifier and Type | Method and Description |
---|---|
void |
add(TiffImage image)
Adds the specified image's frames to current frame.
|
void |
addFrame(TiffFrame frame)
Adds the frame to image
|
void |
addFrames(TiffFrame[] frames)
Adds the frames array to image
|
TiffFrame |
getActiveFrame()
Gets the active frame.
|
int |
getBitsPerPixel()
Gets the image bits per pixel value of current frame.
|
int |
getByteOrder()
Gets a value indicating the tiff byte order.
|
TiffFrame[] |
getFrames()
Gets Frames array of the image.
|
int |
getHeight()
Gets the image height.
|
int |
getWidth()
Gets the image width.
|
void |
insertFrame(int index,
TiffFrame frameToInsert)
The insert frame.
|
protected void |
loadPixelsInternal(Rectangle rectangle,
IPartialPixelLoader pixelLoader)
Loads pixels (format specific method).
|
protected void |
releaseManagedResources()
Releases the managed resources.
|
TiffFrame |
removeFrame(int index)
Removes the frame by its index.
|
void |
removeFrame(TiffFrame frame)
Removes the specified frame.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
resizeProportional(int newWidth,
int newHeight,
int resizeType)
Performs proportional resize on the image.
|
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the Active frame only.
|
void |
rotateFlipAll(int rotateFlip)
Rotates the flip all frames in image.
|
void |
save(Stream stream)
Saves the object's data to the specified stream.
|
protected void |
savePixelsInternal(Rectangle rectangle,
Color[] pixels)
Saves pixels (format specific method).
|
void |
setActiveFrame(TiffFrame value)
Sets the active frame.
|
void |
setByteOrder(int value)
Sets a value indicating the tiff byte order.
|
getHorizontalResolution, getPixel, getVerticalResolution, loadPartialPixels, loadPixels, loadPixelsUnitTest, readScanLine, savePixels, setHorizontalResolution, setPalette, setPixel, setResolution, setVerticalResolution, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, create, getBounds, getContainer, getFileFormat, getFileFormat, getFitRectangle, getFitRectangle, getFittingRectangle, getFittingRectangle, getPalette, getSize, getUseCompactPalette, load, onCompactPaletteUsageChanged, onPaletteChanged, onPaletteChanging, resize, save, save, setContainer, setPalette, setUseCompactPalette
getDataStreamContainer, onDataStreamContainerChanging, save, save, setDataStreamContainer
dispose, getDisposed, releaseUnmanagedResources, verifyNotDisposed
public TiffImage()
Initializes a new instance of the TiffImage
class.
public TiffImage(StreamContainer readerStream)
Initializes a new instance of the TiffImage
class.
readerStream
- The reader stream.public TiffImage(TiffFrame frame)
Initializes a new instance of the TiffImage
class.
frame
- The tiff frame.public void add(TiffImage image)
Adds the specified image's frames to current frame.
image
- The source image.public void addFrame(TiffFrame frame)
Adds the frame to image
frame
- The frame to add.public void addFrames(TiffFrame[] frames)
Adds the frames array to image
frames
- The frames array to addpublic TiffFrame getActiveFrame()
Gets the active frame.
Value: Active frame.public int getBitsPerPixel()
Gets the image bits per pixel value of current frame.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public int getByteOrder()
Gets a value indicating the tiff byte order.
Value: The tiff byte order.public TiffFrame[] getFrames()
Gets Frames array of the image.
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public void insertFrame(int index, TiffFrame frameToInsert)
The insert frame.
index
- Index of new frame in list of framesframeToInsert
- The frame To Insert.protected void loadPixelsInternal(Rectangle rectangle, IPartialPixelLoader pixelLoader)
Loads pixels (format specific method).
loadPixelsInternal
in class RasterImage
rectangle
- The rectangle to load pixels from.pixelLoader
- The partial pixel loader. The inheritor should call corresponding methods on this interface when pixels are loaded.protected void releaseManagedResources()
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
releaseManagedResources
in class RasterImage
public TiffFrame removeFrame(int index)
Removes the frame by its index.
index
- Index of frame to be removed.
public void removeFrame(TiffFrame frame)
Removes the specified frame.
frame
- The frame to remove.
public void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
resize
in class RasterImage
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public void resizeProportional(int newWidth, int newHeight, int resizeType)
Performs proportional resize on the image.
The proportional resize will resize each frame according to the ratio of newWidth
/width and newHeight
/height.
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the Active frame only.
rotateFlip
in class Image
rotateFlipType
- The rotate flip type.public void rotateFlipAll(int rotateFlip)
Rotates the flip all frames in image.
rotateFlip
- The rotate flip type.public void save(Stream stream)
Saves the object's data to the specified stream.
save
in class DataStreamSupporter
stream
- The stream to save the object's data to.protected void savePixelsInternal(Rectangle rectangle, Color[] pixels)
Saves pixels (format specific method).
savePixelsInternal
in class RasterImage
rectangle
- The rectangle to save pixels to.pixels
- The pixels array.public void setActiveFrame(TiffFrame value)
Sets the active frame.
Value: Active frame.public void setByteOrder(int value)
Sets a value indicating the tiff byte order.
Value: The tiff byte order.