JPEG & Intrinsic JPEG Values Function Reference
Functions for performing basic operations on a JPEG file
Function: |
get_jpeg_header_data |
Description: |
Reads all the JPEG header segments from an JPEG image file into an array
|
Parameters: |
filename |
the filename of the file to JPEG file to read |
Returns: |
headerdata |
Array of JPEG header segments |
FALSE |
if headers could not be read |
Function: |
put_jpeg_header_data |
Description: |
Writes JPEG header data into a JPEG file. Takes an array in the
same format as from get_jpeg_header_data, and combines it with
the image data of an existing JPEG file, to create a new JPEG file
WARNING: As this function will replace all JPEG headers,
including SOF etc, it is best to read the jpeg headers
from a file, alter them, then put them back on the same
file. If a SOF segment wer to be transfered from one
file to another, the image could become unreadable unless
the images were idenical size and configuration
|
Parameters: |
old_filename |
the JPEG file from which the image data will be retrieved |
new_filename |
the name of the new JPEG to create (can be same as old_filename) |
jpeg_header_data |
a JPEG header data array in the same format as from get_jpeg_header_data |
Returns: |
TRUE |
on Success |
FALSE |
on Failure |
Function: |
get_jpeg_Comment |
Description: |
Retreives the contents of the JPEG Comment (COM = 0xFFFE) segment if one exists
|
Parameters: |
jpeg_header_data |
the JPEG header data, as retrieved from the get_jpeg_header_data function |
Returns: |
string |
Contents of the Comment segement |
FALSE |
if the comment segment couldnt be found |
Function: |
Interpret_Comment_to_HTML |
Description: |
Generates html showing the contents of any JPEG Comment segment
|
Parameters: |
jpeg_header_data |
the JPEG header data, as retrieved from the get_jpeg_header_data function |
Returns: |
output |
the HTML |
Function: |
get_jpeg_intrinsic_values |
Description: |
Retreives information about the intrinsic characteristics of the jpeg image, such as Bits per Component, Height and Width.
|
Parameters: |
jpeg_header_data |
the JPEG header data, as retrieved from the get_jpeg_header_data function |
Returns: |
array |
An array containing the intrinsic JPEG values |
FALSE |
if the comment segment couldnt be found |
Function: |
Interpret_intrinsic_values_to_HTML |
Description: |
Generates html showing some of the intrinsic JPEG values which were retrieved with the get_jpeg_intrinsic_values function
|
Parameters: |
values |
the JPEG intrinsic values, as read from get_jpeg_intrinsic_values |
Returns: |
OutputStr |
A string containing the HTML |
Function: |
get_jpeg_image_data |
Description: |
Retrieves the compressed image data part of the JPEG file
|
Parameters: |
filename |
the filename of the JPEG file to read |
Returns: |
compressed_data |
A string containing the compressed data |
FALSE |
if retrieval failed |
Function: |
Generate_JPEG_APP_Segment_HTML |
Description: |
Generates html showing information about the Application (APP) segments which are present in the JPEG file
|
Parameters: |
jpeg_header_data |
the JPEG header data, as retrieved from the get_jpeg_header_data function |
Returns: |
output |
A string containing the HTML |