Returns true if the start of the entropy-coded image data
has been reached. Note that if setReadPastImageData has been called with a true value this point may be reached and then skipped past depending on what markers are asked for, in which case this method will return false. In most cases you won't care whether isEof or isAtImageData returns true, but if you really want to know you can tell the difference.
Returns true if the end of the file has been encountered
After a 'false' return from readMarker or readNextMarker, This function can be used to determine whether the end of the file has been encountered. EOF (or the start of image data) is also indicated by a false return from readMarker or readNextMarker (as opposed to an actual error condition, such as a damaged file, which throws a JpegMarkerReaderException).
Locates and returns the next instance of the desired marker type
Scans through the JPEG file until a marker of the specified type is encountered. JPEG marker types consist of two bytes: 0xFF, and a second byte which identifies that particular marker. Pass only the second byte, as an integer. See the JpegXmpReader package for an example of usage.
If the marker is not found before EOF, returns false (test for this with === false). On success, returns the data for the specified marker, as a string.
Note that some marker types can occur more than once in a single file. You may call readMarker again if, after examining the data, you determine that it is not the marker you wanted or you simply wish to fetch another.
Reads and returns the next marker, regardless of marker type
When you really want the next marker no matter what it is. On EOF, returns false (just false, not an array). On success, returns an array of two elements: the marker type (as an integer) and the marker data (as a string).
If the marker is a _standalone marker which, by definition, has no data associated with it, the second element of the array will be set to false.
By default, Image_JpegMarkerReader will return the SOS marker (0xDA) as the last marker and begin indicating EOF at that point.
If this method is called with readPastImageData set to true, Image_JpegMarkerReader will skip over the actual entropy-coded image data (a very slow operation) to look for markers at the very end of the file, such as (and probably limited to) EOI.
You don't want to do this unless you absolutely have to.
Access: public
Parameters:
boolean
$readPastImageData
—
set to true if markers after image data are considered interesting (warning: slow)