Class PelIfd

Description

Class representing an Image File Directory (IFD).

TIFF data is structured as a number of Image File Directories, IFDs for short. Each IFD contains a number of entries, some data and finally a link to the next IFD.

Located in /PelIfd.php (line 67)


	
			
Class Constant Summary
 EXIF = 2
 GPS = 3
 IFD0 = 0
 IFD1 = 1
Method Summary
 void addEntry (PelEntry $e)
 PelIfd __construct ()
 void getBytes (int $offset, PelByteOrder $order)
 array getEntries ()
 string getName ()
 array getSubIfds ()
 string getThumbnailData ()
 boolean isLastIfd ()
 void load (PelDataWindow $d, int $offset)
 void setNextIfd (PelIfd $i)
 string __toString ()
Methods
addEntry (line 316)

Adds an entry to the directory.

  • todo: The entry will be identified with it's tag, so each directory can only contain one entry with each tag. Is this a bug?
void addEntry (PelEntry $e)
  • PelEntry $e: the entry that will be added.
Constructor __construct (line 132)

Construct a new Image File Directory (IFD).

The IFD will be empty, use the addEntry() method to add an PelEntry. Use the setNext() method to link this IFD to another.

PelIfd __construct ()
getBytes (line 444)

Turn this directory into bytes.

This directory will be turned into a byte string, with the specified byte order. The offsets will be calculated from the offset given.

void getBytes (int $offset, PelByteOrder $order)
getEntries (line 346)

Returns all entries contained in this IFD.

array getEntries ()
getEntry (line 329)

Retrieve an entry.

  • return: the entry associated with the tag, or null if no such entry exists.
PelEntry getEntry (PelTag $tag)
  • PelTag $tag: the tag identifying the entry.
getName (line 296)

Get the name of this directory (not currently used).

  • return: the name of this directory.
string getName ()
getNextIfd (line 385)

Return the IFD pointed to by this directory.

  • return: the next IFD, following this IFD. If this is the last IFD, null is returned.
PelIfd getNextIfd ()
getSubIfd (line 412)

Return a sub IFD.

  • return: the IFD associated with the tag, or null if that sub IFD doesn't exist.
PelIfd getSubIfd (PelTag $tag)
getSubIfds (line 426)

Get all sub IFDs.

array getSubIfds ()
getThumbnailData (line 361)

Returns available thumbnail data.

  • return: the bytes in the thumbnail, if any. If the IFD doesn't contain any thumbnail data, the empty string is returned.
  • todo: Throw an exception instead when no data is available?
  • todo: Return the $this->thumb_data object instead of the bytes?
string getThumbnailData ()
isLastIfd (line 396)

Check if this is the last IFD.

  • return: true if there are no following IFD, false otherwise.
boolean isLastIfd ()
load (line 145)

Load data into a Image File Directory (IFD).

void load (PelDataWindow $d, int $offset)
  • PelDataWindow $d: the data window that will provide the data.
  • int $offset: the offset within the window where the directory will be found.
setNextIfd (line 374)

Make this directory point to a new directory.

void setNextIfd (PelIfd $i)
  • PelIfd $i: the IFD that this directory will point to.
__toString (line 560)

Turn this directory into text.

  • return: information about the directory, mainly for debugging.
string __toString ()
Class Constants
EXIF = 2 (line 71)
GPS = 3 (line 72)
IFD0 = 0 (line 69)
IFD1 = 1 (line 70)
INTEROPERABILITY = 4 (line 73)

SourceForge.net Logo Documentation generated on Fri, 18 Feb 2005 01:43:18 +0100 by phpDocumentor 1.3.0RC3