TIFF

Implements *.TIFF file handling. LZW compression support requires linking abainst ncompress42. JPEG support requires a codec of some sort.

Constructors

this
this()

CTOR for loader

Members

Enums

ByteOrderIdentifier
enum ByteOrderIdentifier

Byte order identification for header. LE means little, BE means big endianness

Functions

frameTime
uint frameTime()
Undocumented in source. Be warned that the author may not have intended to support it.
getAuthor
string getAuthor()
Undocumented in source. Be warned that the author may not have intended to support it.
getBitdepth
ubyte getBitdepth()
Undocumented in source. Be warned that the author may not have intended to support it.
getComment
string getComment()
Undocumented in source. Be warned that the author may not have intended to support it.
getCopyright
string getCopyright()
Undocumented in source. Be warned that the author may not have intended to support it.
getCreationTimeStr
string getCreationTimeStr()
Undocumented in source. Be warned that the author may not have intended to support it.
getCurrentImage
uint getCurrentImage()
Undocumented in source. Be warned that the author may not have intended to support it.
getDescription
string getDescription()
Undocumented in source. Be warned that the author may not have intended to support it.
getID
string getID()
Undocumented in source. Be warned that the author may not have intended to support it.
getJobName
string getJobName()
Undocumented in source. Be warned that the author may not have intended to support it.
getPaletteBitdepth
ubyte getPaletteBitdepth()
Undocumented in source. Be warned that the author may not have intended to support it.
getPalettePixelFormat
uint getPalettePixelFormat()
Undocumented in source. Be warned that the author may not have intended to support it.
getPixelFormat
uint getPixelFormat()
Undocumented in source. Be warned that the author may not have intended to support it.
getSoftwareInfo
string getSoftwareInfo()
Undocumented in source. Be warned that the author may not have intended to support it.
getSoftwareVersion
string getSoftwareVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
getSource
string getSource()
Undocumented in source. Be warned that the author may not have intended to support it.
height
uint height()
Undocumented in source. Be warned that the author may not have intended to support it.
isAnimation
bool isAnimation()
Undocumented in source. Be warned that the author may not have intended to support it.
isIndexed
bool isIndexed()
Undocumented in source. Be warned that the author may not have intended to support it.
nOfImages
uint nOfImages()
Undocumented in source. Be warned that the author may not have intended to support it.
setAuthor
string setAuthor(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setComment
string setComment(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setCopyright
string setCopyright(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setCreationTime
string setCreationTime(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setCurrentImage
uint setCurrentImage(uint frame)
Undocumented in source. Be warned that the author may not have intended to support it.
setDescription
string setDescription(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setID
string setID(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setJobName
string setJobName(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setSoftwareInfo
string setSoftwareInfo(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setSoftwareVersion
string setSoftwareVersion(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setSource
string setSource(string val)
Undocumented in source. Be warned that the author may not have intended to support it.
setStaticImage
void setStaticImage()

Sets the current image to the static if available

width
uint width()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

load
TIFF load(FILE file)

Loads a TIFF file from either disk or memory.

Structs

Header
struct Header

Standard TIFF header. Loaded as a bytestream at once.

IFD
struct IFD

TIFF Image File Directory. Loaded manually due to the nature of this field.

Variables

_bitdepth
ubyte _bitdepth;
Undocumented in source.
_height
uint _height;

Sizes of the current image

_palbitdepth
ubyte _palbitdepth;

Bitdepths of the current image

_palettePixelFormat
uint _palettePixelFormat;

Pixelformat of the current image

_pixelFormat
uint _pixelFormat;
Undocumented in source.
_width
uint _width;
Undocumented in source.
currentImg
uint currentImg;

Current image selected with the MultiImage interface's functions.

directoryEntries
IFD[] directoryEntries;

Image data.

header
Header header;

TIFF file header.

Inherited Members

From Image

_palette
IPalette _palette;

Contains palette data and information

_imageData
IImageData _imageData;

Contains image data and information.

mod
ubyte mod;

used for fast access of indexes DEPRECATED!

shift
ubyte shift;

used for fast access of indexes DEPRECATED!

width
uint width [@property getter]

Returns the width of the image in pixels.

height
uint height [@property getter]

Returns the height of the image in pixels.

isIndexed
bool isIndexed [@property getter]

Returns true if the image is indexed.

getBitdepth
ubyte getBitdepth [@property getter]

Returns the number of bits used per sample.

getPaletteBitdepth
ubyte getPaletteBitdepth [@property getter]

Returns the number of bits used per colormap entry.

getPixelFormat
uint getPixelFormat [@property getter]

Returns the pixelformat of the image. See enumerator PixelFormat for more info.

getPalettePixelFormat
uint getPalettePixelFormat [@property getter]

Returns the pixelformat of the palette. See enumerator PixelFormat for more info.

backgroundColorIndex
int backgroundColorIndex [@property getter]

Returns the background color index if there's any. Returns -1 if there's no background color, -2 if background color is not indexed.

backgroundColor
ARGB8888 backgroundColor [@property getter]

Returns the background color if there's any, or a default value otherwise.

getBitplanes
ubyte getBitplanes()

Returns the number of planes the image have. Default is one.

palette
IPalette palette()

Returns a palette range, which can be used to read the palette.

imageData
IImageData imageData()

Returns the image data.

readPixel
ARGB8888 readPixel(uint x, uint y)

Reads a single 32bit pixel. If the image is indexed, a color lookup will be done.

readPalette
ARGB8888 readPalette(size_t index)

Looks up the index on the palette, then returns the color value as a 32 bit value.

flipVertical
void flipVertical()

Flips the image on the vertical axis. Useful to set images to the correct top-left screen origin point.

flipHorizontal
void flipHorizontal()

Flips the image on the vertical axis. Useful to set images to the correct top-left screen origin point.

topOrigin
bool topOrigin()

Returns true if the image originates from the top

rightSideOrigin
bool rightSideOrigin()

Returns true if the image originates from the right

From MultiImage

getCurrentImage
uint getCurrentImage()

Returns which image is being set to be worked on.

setCurrentImage
uint setCurrentImage(uint frame)

Sets which image is being set to be worked on.

setStaticImage
void setStaticImage()

Sets the current image to the static if available

nOfImages
uint nOfImages()

Number of images in a given multi-image.

frameTime
uint frameTime()

Returns the frame duration in hmsec if animation for the given frame. Returns 0 if not an animation.

isAnimation
bool isAnimation()

Returns true if the multi-image is animated

From ImageMetadata

getID
string getID()
Undocumented in source.
getAuthor
string getAuthor()
Undocumented in source.
getComment
string getComment()
Undocumented in source.
getJobName
string getJobName()
Undocumented in source.
getSoftwareInfo
string getSoftwareInfo()
Undocumented in source.
getSoftwareVersion
string getSoftwareVersion()
Undocumented in source.
getDescription
string getDescription()
Undocumented in source.
getSource
string getSource()
Undocumented in source.
getCopyright
string getCopyright()
Undocumented in source.
getCreationTimeStr
string getCreationTimeStr()
Undocumented in source.
setID
string setID(string val)
Undocumented in source.
setAuthor
string setAuthor(string val)
Undocumented in source.
setComment
string setComment(string val)
Undocumented in source.
setJobName
string setJobName(string val)
Undocumented in source.
setSoftwareInfo
string setSoftwareInfo(string val)
Undocumented in source.
setSoftwareVersion
string setSoftwareVersion(string val)
Undocumented in source.
setDescription
string setDescription(string val)
Undocumented in source.
setSource
string setSource(string val)
Undocumented in source.
setCopyright
string setCopyright(string val)
Undocumented in source.
setCreationTime
string setCreationTime(string val)
Undocumented in source.

Meta