phpExifRW
[ class tree: phpExifRW ] [ index: phpExifRW ] [ all elements ]

Class: phpExifRW

Source Location: Program_Root/exif.inc

Class Overview




Author(s):

Version:

  • 0.5

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 335]


Tags:

todo:  Handling Unicode character in UserComment tag of EXif Information.
version:  0.5
todo:  Support of additional tags.
todo:  Add EXIF audio reading methods (I think it exists!)
todo:  Writing exif information to the file.
author:  Vinay Yadav (vinayRas) <vinay@sanisoft.com>


[ Top ]


Class Variables

$BytesPerFormat = array(0,1,1,2,4,8,1,1,2,4,8,4,8)

[line 355]

Stores total number fo Sections


Type:   mixed


[ Top ]

$cacheDir =  ""

[line 383]


Type:   mixed


[ Top ]

$caching =  true

[line 382]


Type:   mixed


[ Top ]

$currSection =  0

[line 353]


Type:   mixed


[ Top ]

$debug =  false

[line 378]


Type:   mixed


[ Top ]

$DirWithThumbnailPtrs =  0

[line 357]


Type:   mixed


[ Top ]

$errno =  0

[line 375]


Type:   mixed


[ Top ]

$errstr =  ""

[line 376]


Type:   mixed


[ Top ]

$ExifImageWidth =  0

[line 349]


Type:   mixed


[ Top ]

$exifSection =  -1

[line 373]


Type:   mixed


[ Top ]

$file =   ""

[line 367]

related to $RealMode arrays values


Type:   mixed


[ Top ]

$FocalplaneUnits =  0

[line 351]


Type:   mixed


[ Top ]

$FocalplaneXRes =  0

[line 350]


Type:   mixed


[ Top ]

$ImageReadMode =  3

[line 366]


Type:   mixed


[ Top ]

$MotorolaOrder =  0

[line 348]


Type:   mixed


[ Top ]

$newFile =  1

[line 368]

JPEG file to parse for EXIF data


Type:   mixed


[ Top ]

$ReadMode = array(
                            "READ_EXIF" => 1,
                            "READ_IMAGE" => 2,
                            "READ_ALL" => 3
                        )

[line 360]


Type:   mixed


[ Top ]

$sections = array()

[line 352]


Type:   mixed


[ Top ]

$showTags =  false

[line 379]


Type:   mixed


[ Top ]

$thumbnail =  ""

[line 370]

flag to check if the current file has been parsed or not.


Type:   mixed


[ Top ]

$ThumbnailSize =  0

[line 358]


Type:   mixed


[ Top ]

$thumbnailURL =  ""

[line 371]


Type:   mixed


[ Top ]



Class Methods


constructor phpExifRW [line 390]

phpExifRW phpExifRW( [string $file = ""])

Constructor



Parameters:

string   $file   File name to be parsed.

[ Top ]

method addComment [line 1643]

void addComment( string $comment)

Adds comment to the image.

NOTE: Will have to call writeExif for the comments and other data to be written back to image.




Parameters:

string   $comment   Commnent as string

[ Top ]

method addExif [line 1730]

void addExif( string $exifData)

Returns the exif information stored



Parameters:

string   $exifData  

Exif Data to be added.

NOTE: This function will blindly replace any existing EXIF data


[ Top ]

method assign [line 611]

void assign( string $file)

Changing / Assiging new file



Parameters:

string   $file   JPEG file to process

[ Top ]

method ConvertAnyFormat [line 1160]

void ConvertAnyFormat( mixed $ValuePtr, mixed $Format)



[ Top ]

method ConvertAnyFormatBack [line 1203]

void ConvertAnyFormatBack( mixed $Value, mixed $Format)

Reverse of ConvertAnyFormat, - Incomplete

TODO:




[ Top ]

method debug [line 429]

void debug( string $str, [int $TYPE = 0])

Show Debugging information



Parameters:

string   $str   Debugging message to display
int   $TYPE   Type of error (0 - Warning, 1 - Error)

[ Top ]

method findMarker [line 1627]

int findMarker( hex $marker)

Searched for the tag specified in the sections list



Parameters:

hex   $marker   Tag to search for

[ Top ]

method Get16u [line 1081]

void Get16u( int $val, int $by)

Converts two byte number into its equivalent int integer



Parameters:

int   $val  
int   $by  

[ Top ]

method Get32s [line 1099]

int Get32s( int $val1, int $val2, int $val3, int $val4)

Converts 4-byte number into its equivalent integer



Parameters:

int   $val1  
int   $val2  
int   $val3  
int   $val4  

[ Top ]

method get32u [line 1123]

int get32u( int $val1, int $val2, int $val3, int $val4)

Converts 4-byte number into its equivalent integer with the help of Get32s



Parameters:

int   $val1  
int   $val2  
int   $val3  
int   $val4  

[ Top ]

method getExif [line 1715]

void getExif( )

Returns the exif information stored



[ Top ]

method getFormat [line 1681]

int getFormat( hex $tag)

Return the format of data of any tag.



Tags:

return:  Return the format as int


Parameters:

hex   $tag   Tag whose format has to looked for

[ Top ]

method getThumbnail [line 1284]

string getThumbnail( )

Function to give back the whole image



Tags:

return:  full image


[ Top ]

method modifyExifDetails [line 1491]

void modifyExifDetails( )

This functiion writes back the modifed exif data into the imageinfo array - INCOMPLETE



[ Top ]

method PrintFormatNumber [line 1134]

void PrintFormatNumber( array $ValuePtr, int $Format, int $ByteCount)

needed for examining exif header and printng the value of a tag



Parameters:

array   $ValuePtr  
int   $Format  
int   $ByteCount  

[ Top ]

method ProcessExifDir [line 683]

void ProcessExifDir( string $DirStart, string $OffsetBase, int $ExifLength)

Process one of the nested EXIF directories.



Parameters:

string   $DirStart   All directory information
string   $OffsetBase   whole Section
int   $ExifLength   Length of exif section

[ Top ]

method processFile [line 442]

void processFile( )

Processes the whole file.



[ Top ]

method process_COM [line 662]

void process_COM( array $data, int $length)

Process Comments



Parameters:

array   $data   Section data
int   $length   Length of the section

[ Top ]

method process_EXIF [line 1027]

void process_EXIF( array $data, int $length)

Process Exif data



Parameters:

array   $data   Section data as an array
int   $length   Length of the section (length of data array)

[ Top ]

method process_SOFn [line 631]

void process_SOFn( array $data, hex $marker)

Process SOFn section of Image



Parameters:

array   $data   An array containing whole section.
hex   $marker   Marker to specify the type of section.

[ Top ]

method saveThumbnail [line 1251]

void saveThumbnail( String $ThumbFile)

Function to extract thumbnail from Exif data of the image.

and store it in a filename given by $ThumbFile




Parameters:

String   $ThumbFile   Files name to store the thumbnail

[ Top ]

method setExifData [line 1483]

void setExifData( hex $param, string $value)

Modifies or sets value of specified Tag -



Parameters:

hex   $param   Tag, whose value has to be set
string   $value   Tags value

[ Top ]

method showImageInfo [line 1300]

void showImageInfo( )

Display the extracted Exif information. It can overloaded for the look to change.



[ Top ]

method showThumbnail [line 1275]

string showThumbnail( )

Returns thumbnail url along with parameter supplied.

Should be called in src attribute of image




Tags:

return:  File URL


[ Top ]

method writeImage [line 1755]

void writeImage( string $file)

Write the whole image back into a file.

This function does not write back to the same file. You need to specify a filename




Parameters:

string   $file   filename to save the JPEG content to

[ Top ]


Documentation generated on Sat, 2 Aug 2003 16:19:43 +0530 by phpDocumentor 1.2.1