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 65)


	
			
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 310)

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 130)

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 438)

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 340)

Returns all entries contained in this IFD.

array getEntries ()
getEntry (line 323)

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 290)

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

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

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 406)

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 420)

Get all sub IFDs.

array getSubIfds ()
getThumbnailData (line 355)

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 390)

Check if this is the last IFD.

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

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 368)

Make this directory point to a new directory.

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

Turn this directory into text.

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

SourceForge.net Logo Documentation generated on Wed, 21 Jul 2004 19:13:11 +0200 by phpDocumentor 1.3.0RC3