source: extensions/edit_gmaps/admin/include/IPTC.php @ 9412

Last change on this file since 9412 was 9412, checked in by cljosse, 13 years ago
File size: 29.2 KB
Line 
1<?php
2
3/******************************************************************************
4*
5* Filename:     IPTC.php
6*
7* Description:  Provides functions for reading and writing IPTC-NAA Information
8*               Interchange Model metadata
9*
10* Author:      Evan Hunter
11*
12* Date:         23/7/2004
13*
14* Project:      PHP JPEG Metadata Toolkit
15*
16* Revision:     1.10
17*
18* Changes:      1.00 -> 1.01 : changed get_IPTC to return partial data when error occurs
19*               1.01 -> 1.10 : changed put_IPTC to check if the incoming IPTC block is valid
20*                              changed Interpret_IPTC_to_HTML, adding nl2br functions for each text field,
21*                              so that multiline text displays properly
22*
23* URL:          http://electronics.ozhiker.com
24*
25* Copyright:    Copyright " . $auteur . " 2004
26*
27* License:      This file is part of the PHP JPEG Metadata Toolkit.
28*
29*               The PHP JPEG Metadata Toolkit is free software; you can
30*               redistribute it and/or modify it under the terms of the
31*               GNU General Public License as published by the Free Software
32*               Foundation; either version 2 of the License, or (at your
33*               option) any later version.
34*
35*               The PHP JPEG Metadata Toolkit is distributed in the hope
36*               that it will be useful, but WITHOUT ANY WARRANTY; without
37*               even the implied warranty of MERCHANTABILITY or FITNESS
38*               FOR A PARTICULAR PURPOSE.  See the GNU General Public License
39*               for more details.
40*
41*               You should have received a copy of the GNU General Public
42*               License along with the PHP JPEG Metadata Toolkit; if not,
43*               write to the Free Software Foundation, Inc., 59 Temple
44*               Place, Suite 330, Boston, MA  02111-1307  USA
45*
46*               If you require a different license for commercial or other
47*               purposes, please contact the author: evan@ozhiker.com
48*
49******************************************************************************/
50
51
52// TODO: Not all of the IPTC fields have been tested properly
53
54/******************************************************************************
55*
56* Function:     get_IPTC
57*
58* Description:  Extracts IPTC-NAA IIM data from the string provided, and returns
59*               the information as an array
60*
61* Parameters:   Data_Str - the string containing the IPTC-NAA IIM records. Must
62*                          be exact length of the IPTC-NAA IIM data.
63*
64* Returns:      OutputArray - Array of IPTC-NAA IIM records
65*               FALSE - If an error occured in decoding
66*
67******************************************************************************/
68
69function get_IPTC( $Data_Str )
70{
71
72        // Initialise the start position
73        $pos = 0;
74        // Create the array to receive the data
75        $OutputArray = array( );
76
77        // Cycle through the IPTC records, decoding and storing them
78        while( $pos < strlen($Data_Str) )
79        {
80                // TODO - Extended Dataset record not supported
81
82                // Check if there is sufficient data for reading the record
83                if ( strlen( substr($Data_Str,$pos) ) < 5 )
84                {
85                        // Not enough data left for a record - Probably corrupt data - ERROR
86                        // Change: changed to return partial data as of revision 1.01
87                        return $OutputArray;
88                }
89
90                // Unpack data from IPTC record:
91                // First byte - IPTC Tag Marker - always 28
92                // Second byte - IPTC Record Number
93                // Third byte - IPTC Dataset Number
94                // Fourth and fifth bytes - two byte size value
95                $iptc_raw = unpack( "CIPTC_Tag_Marker/CIPTC_Record_No/CIPTC_Dataset_No/nIPTC_Size", substr($Data_Str,$pos) );
96
97                // Skip position over the unpacked data
98                $pos += 5;
99
100                // Construct the IPTC type string eg 2:105
101                $iptctype = sprintf( "%01d:%02d", $iptc_raw['IPTC_Record_No'], $iptc_raw['IPTC_Dataset_No']);
102
103                // Check if there is sufficient data for reading the record contents
104                if ( strlen( substr( $Data_Str, $pos, $iptc_raw['IPTC_Size'] ) ) !== $iptc_raw['IPTC_Size'] )
105                {
106                        // Not enough data left for the record content - Probably corrupt data - ERROR
107                        // Change: changed to return partial data as of revision 1.01
108                        return $OutputArray;
109                }
110
111                // Add the IPTC record to the output array
112                $OutputArray[] = array( "IPTC_Type" => $iptctype ,
113                                        "RecName" => $GLOBALS[ "IPTC_Entry_Names" ][ $iptctype ],
114                                        "RecDesc" => $GLOBALS[ "IPTC_Entry_Descriptions" ][ $iptctype ],
115                                        "RecData" => substr( $Data_Str, $pos, $iptc_raw['IPTC_Size'] ) );
116
117                // Skip over the IPTC record data
118                $pos += $iptc_raw['IPTC_Size'];
119        }
120        return $OutputArray;
121
122}
123
124
125/******************************************************************************
126* End of Function:     get_IPTC
127******************************************************************************/
128
129
130
131
132/******************************************************************************
133*
134* Function:     put_IPTC
135*
136* Description:  Encodes an array of IPTC-NAA records into a string encoded
137*               as IPTC-NAA IIM. (The reverse of get_IPTC)
138*
139* Parameters:   new_IPTC_block - the IPTC-NAA array to be encoded. Should be
140*                                the same format as that received from get_IPTC
141*
142* Returns:      iptc_packed_data - IPTC-NAA IIM encoded string
143*
144******************************************************************************/
145
146
147function put_IPTC( $new_IPTC_block )
148{
149        // Check if the incoming IPTC block is valid
150        if ( $new_IPTC_block == FALSE )
151        {
152                // Invalid IPTC block - abort
153                return FALSE;
154        }
155        // Initialise the packed output data string
156        $iptc_packed_data = "";
157
158        // Cycle through each record in the new IPTC block
159        foreach ($new_IPTC_block as $record)
160        {
161                // Extract the Record Number and Dataset Number from the IPTC_Type field
162                list($IPTC_Record, $IPTC_Dataset) = sscanf( $record['IPTC_Type'], "%d:%d");
163
164                // Write the IPTC-NAA IIM Tag Marker, Record Number, Dataset Number and Data Size to the packed output data string
165                $iptc_packed_data .= pack( "CCCn", 28, $IPTC_Record, $IPTC_Dataset, strlen($record['RecData']) );
166
167                // Write the IPTC-NAA IIM Data to the packed output data string
168                $iptc_packed_data .= $record['RecData'];
169        }
170
171        // Return the IPTC-NAA IIM data
172        return $iptc_packed_data;
173}
174
175/******************************************************************************
176* End of Function:     put_IPTC
177******************************************************************************/
178
179
180
181/******************************************************************************
182*
183* Function:     Interpret_IPTC_to_HTML
184*
185* Description:  Generates html detailing the contents a IPTC-NAA IIM array
186*               which was retrieved with the get_IPTC function
187*
188* Parameters:   IPTC_info - the IPTC-NAA IIM array,as read from get_IPTC
189*
190* Returns:      OutputStr - A string containing the HTML
191*
192******************************************************************************/
193
194function Interpret_IPTC_to_HTML( $IPTC_info )
195{
196        // Create a string to receive the HTML
197        $output_str ="";
198
199        // Check if the IPTC
200        if ( $IPTC_info !== FALSE )
201        {
202
203
204                // Add Heading to HTML
205             $output_str .=   "<fieldset id='IPTC' class='fieldset'><legend>IPTC-NAA Record</legend>";
206             
207
208                // Add Table to HTML
209                $output_str .= "\n<table class=\"IPTC_Table\" border=1>\n";
210
211                // Cycle through each of the IPTC-NAA IIM records
212                foreach( $IPTC_info as $IPTC_Record )
213                {
214                        // Check if the record is a known IPTC field
215                        $Record_Name = $IPTC_Record['RecName'];
216                        $tabval=$IPTC_Record;
217                        $tabval['Type_src']="iptc";
218                        $tabval['Tag Name']=$Record_Name; 
219                        $tabval['Text Value']= "N.C";
220
221                         if ( $Record_Name == "" )
222                        {
223                                // Record is an unknown field - add message to HTML
224                            $tabval['Tag Name']= "Unknown IPTC field ". htmlentities( $IPTC_Record['IPTC_Type'] );
225                            $tabval['Text Value']= nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ;
226                            $output_str .= OutPut_exif($tabval); 
227                        }
228                        else
229                        {
230                                // Record is a recognised IPTC field - Process it accordingly
231
232    switch ( $IPTC_Record['IPTC_Type'] )
233    {
234            case "1:00":    // Envelope Record:Model Version
235            case "1:22":    // Envelope Record:File Format Version   
236                    $tabval['Text Value']=  hexdec( bin2hex( $IPTC_Record['RecData'] ) );
237                    break;
238
239            case "1:90":    // Envelope Record:Coded Character Set
240                    $tabval['Text Value']= "Decoding not yet implemented<br>\n (Hex Data: " . bin2hex( $IPTC_Record['RecData'] );
241                    break;
242                    // TODO: Implement decoding of IPTC record 1:90
243 
244            case "1:20":    // Envelope Record:File Format
245
246                    $formatno = hexdec( bin2hex( $IPTC_Record['RecData'] ) );
247
248                    // Lookup file format from lookup-table
249                    if ( array_key_exists( $formatno, $GLOBALS[ "IPTC_File Formats" ] ) )
250                    {
251                        // Entry was found in lookup table - add it to HTML
252                        $tabval['Tag Name']= "File Format";
253                        $tabval['Text Value']=  $GLOBALS[ "IPTC_File Formats" ][$formatno] ;
254                                             
255                    } else {
256                            // No matching entry was found in lookup table - add message to html
257                        $tabval['Tag Name']= "File Format";
258                        $tabval['Text Value']= "Unknown File Format ($formatno)";
259                    }
260                    break;
261
262
263            case "2:00":    // Application Record:Record Version
264
265       
266    $tabval['Tag Name']= "IPTC Version";
267    $tabval['Text Value']= hexdec( bin2hex( $IPTC_Record['RecData'] ) );
268                    break;
269 
270            case "2:42":    // Application Record: Action Advised
271
272                    // Looup Action
273                    if ( $IPTC_Record['RecData'] == "01" )
274                    {
275
276    $tabval['Text Value']= "Kill";
277                    }
278                    elseif ( $IPTC_Record['RecData'] == "02" )
279                    {
280
281    $tabval['Text Value']= "Replace";
282                    }
283                    elseif ( $IPTC_Record['RecData'] == "03" )
284                    {
285
286    $tabval['Text Value']= "Append";
287                    }
288                    elseif ( $IPTC_Record['RecData'] == "04" )
289                    {
290
291    $tabval['Text Value']= "Reference";
292                    }
293                    else
294                    {
295                            // Unknown Action
296
297    $tabval['Text Value']="Unknown : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) );
298                    }
299                    break;
300
301            case "2:08":    // Application Record:Editorial Update
302                    if ( $IPTC_Record['RecData'] == "01" )
303                    {
304                            // Additional Language
305
306    $tabval['Text Value']= "Additional language";
307                    }
308                    else
309                    {
310                            // Unknown Value
311
312    $tabval['Text Value']= "Unknown : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ;
313                    }
314                    break;
315
316            case "2:30":    // Application Record:Release Date
317            case "2:37":    // Application Record:Expiration Date
318            case "2:47":    // Application Record:Reference Date
319            case "2:55":    // Application Record:Date Created
320            case "2:62":    // Application Record:Digital Creation Date
321            case "1:70":    // Envelope Record:Date Sent
322                    $date_array = unpack( "a4Year/a2Month/A2Day", $IPTC_Record['RecData'] );
323
324    $tabval['Text Value']=   nl2br( HTML_UTF8_Escape( $date_array['Day'] . "/" . $date_array['Month'] . "/" . $date_array['Year'] ) );
325                    break;
326
327            case "2:35":    // Application Record:Release Time
328            case "2:38":    // Application Record:Expiration Time
329            case "2:60":    // Application Record:Time Created
330            case "2:63":    // Application Record:Digital Creation Time
331            case "1:80":    // Envelope Record:Time Sent
332                    $time_array = unpack( "a2Hour/a2Minute/A2Second/APlusMinus/A4Timezone", $IPTC_Record['RecData'] );
333
334                    $tabval['Text Value']=   nl2br( HTML_UTF8_Escape( $time_array['Hour'] . ":" . $time_array['Minute'] . ":" . $time_array['Second'] . " ". $time_array['PlusMinus'] . $time_array['Timezone'] ) ) ;
335                    break;
336
337            case "2:75":    // Application Record:Object Cycle
338                    // Lookup Value
339                    if ( $IPTC_Record['RecData'] == "a" )
340                    {
341
342                            $tabval['Text Value']= "Morning";
343                    }
344                    elseif ( $IPTC_Record['RecData'] == "p" )
345                    {
346
347                            $tabval['Text Value']= "Evening";
348                    }
349                    elseif ( $IPTC_Record['RecData'] == "b" )
350                    {
351
352                            $tabval['Text Value']= "Both Morning and Evening";
353                    }
354                    else
355                    {
356                            // Unknown Value
357
358                            $tabval['Text Value']= "Unknown : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ;
359                    }
360                    break;
361
362            case "2:125":   // Application Record:Rasterised Caption
363
364                    $tabval['Text Value']= "460x128 pixel black and white caption image";
365                    break;
366                    // TODO: Display Rasterised Caption for IPTC record 2:125
367
368            case "2:130":   // Application Record:Image Type
369                    // Lookup Number of Components
370                    if ( $IPTC_Record['RecData']{0} == "0" )
371                    {
372
373                            $tabval['Text Value']= "No Objectdata";
374                    }
375                    elseif ( $IPTC_Record['RecData']{0} == "9" )
376                    {
377
378                            $tabval['Text Value']= "Supplemental objects related to other objectdata";
379                    }
380                    else
381                    {
382                                                     
383                            $tabval['Text Value']= "Number of Colour Components : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData']{0} ) );
384                    }
385
386                    // Lookup current objectdata colour
387                    if ( $GLOBALS['ImageType_Names'][ $IPTC_Record['RecData']{1} ] == "" )
388                    {
389                            $tabval['Text Value'] .= ", Unknown : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData']{1} ) );
390                    }
391                    else
392                    {
393                            $tabval['Text Value'] .= ", " . nl2br( HTML_UTF8_Escape( $GLOBALS['ImageType_Names'][ $IPTC_Record['RecData']{1} ] ) );
394                    }
395                                               
396                    break;
397
398            case "2:131":   // Application Record:Image Orientation
399                    // Lookup value
400                    if ( $IPTC_Record['RecData'] == "L" )
401                    {
402                                                   
403                            $tabval['Text Value']= "Landscape";
404                    }
405                    elseif ( $IPTC_Record['RecData'] == "P" )
406                    {
407                                                       
408                            $tabval['Text Value']= "Portrait";
409                    }
410                    elseif ( $IPTC_Record['RecData'] == "S" )
411                    {
412                                                     
413                            $tabval['Text Value']= "Square";
414                    }
415                    else
416                    {
417                            // Unknown Orientation Value
418                                                     
419                            $tabval['Text Value']= "Unknown : " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ;
420                    }
421                    break;
422                     default:        // All other records                                             
423                            $tabval['Text Value']= nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ;
424                    break;                     
425                    } 
426                        $output_str .= OutPut_exif($tabval) ; 
427                               
428                        }
429                }
430
431                // Add Table End to HTML
432                $output_str .= "</table><br>\n</fieldset>";
433        }
434
435        // Return HTML
436        return $output_str;
437}
438
439
440/******************************************************************************
441* End of Function:     Interpret_IPTC_to_HTML
442******************************************************************************/
443
444
445
446/******************************************************************************
447* Global Variable:      IPTC_Entry_Names
448*
449* Contents:     The names of the IPTC-NAA IIM fields
450*
451******************************************************************************/
452
453$GLOBALS[ "IPTC_Entry_Names" ] = array(
454// Envelope Record
455"1:00" => "Model Version",
456"1:05" => "Destination",
457"1:20" => "File Format",
458"1:22" => "File Format Version",
459"1:30" => "Service Identifier",
460"1:40" => "Envelope Number",
461"1:50" => "Product ID",
462"1:60" => "Envelope Priority",
463"1:70" => "Date Sent",
464"1:80" => "Time Sent",
465"1:90" => "Coded Character Set",
466"1:100" => "UNO (Unique Name of Object)",
467"1:120" => "ARM Identifier",
468"1:122" => "ARM Version",
469
470// Application Record
471"2:00" => "Record Version",
472"2:03" => "Object Type Reference",
473"2:05" => "Object Name (Title)",
474"2:07" => "Edit Status",
475"2:08" => "Editorial Update",
476"2:10" => "Urgency",
477"2:12" => "Subject Reference",
478"2:15" => "Category",
479"2:20" => "Supplemental Category",
480"2:22" => "Fixture Identifier",
481"2:25" => "Keywords",
482"2:26" => "Content Location Code",
483"2:27" => "Content Location Name",
484"2:30" => "Release Date",
485"2:35" => "Release Time",
486"2:37" => "Expiration Date",
487"2:35" => "Expiration Time",
488"2:40" => "Special Instructions",
489"2:42" => "Action Advised",
490"2:45" => "Reference Service",
491"2:47" => "Reference Date",
492"2:50" => "Reference Number",
493"2:55" => "Date Created",
494"2:60" => "Time Created",
495"2:62" => "Digital Creation Date",
496"2:63" => "Digital Creation Time",
497"2:65" => "Originating Program",
498"2:70" => "Program Version",
499"2:75" => "Object Cycle",
500"2:80" => "By-Line (Author)",
501"2:85" => "By-Line Title (Author Position) [Not used in Photoshop 7]",
502"2:90" => "City",
503"2:92" => "Sub-Location",
504"2:95" => "Province/State",
505"2:100" => "Country/Primary Location Code",
506"2:101" => "Country/Primary Location Name",
507"2:103" => "Original Transmission Reference",
508"2:105" => "Headline",
509"2:110" => "Credit",
510"2:115" => "Source",
511"2:116" => "Copyright Notice",
512"2:118" => "Contact",
513"2:120" => "Caption/Abstract",
514"2:122" => "Caption Writer/Editor",
515"2:125" => "Rasterized Caption",
516"2:130" => "Image Type",
517"2:131" => "Image Orientation",
518"2:135" => "Language Identifier",
519"2:150" => "Audio Type",
520"2:151" => "Audio Sampling Rate",
521"2:152" => "Audio Sampling Resolution",
522"2:153" => "Audio Duration",
523"2:154" => "Audio Outcue",
524"2:200" => "ObjectData Preview File Format",
525"2:201" => "ObjectData Preview File Format Version",
526"2:202" => "ObjectData Preview Data",
527
528// Pre-ObjectData Descriptor Record
529"7:10"  => "Size Mode",
530"7:20"  => "Max Subfile Size",
531"7:90"  => "ObjectData Size Announced",
532"7:95"  => "Maximum ObjectData Size",
533
534// ObjectData Record
535"8:10"  => "Subfile",
536
537// Post ObjectData Descriptor Record
538"9:10"  => "Confirmed ObjectData Size"
539
540);
541
542/******************************************************************************
543* End of Global Variable:     IPTC_Entry_Names
544******************************************************************************/
545
546
547
548
549
550/******************************************************************************
551* Global Variable:      IPTC_Entry_Descriptions
552*
553* Contents:     The Descriptions of the IPTC-NAA IIM fields
554*
555******************************************************************************/
556
557$GLOBALS[ "IPTC_Entry_Descriptions" ] = array(
558// Envelope Record
559"1:00" => "2 byte binary version number",
560"1:05" => "Max 1024 characters of Destination",
561"1:20" => "2 byte binary file format number, see IPTC-NAA V4 Appendix A",
562"1:22" => "Binary version number of file format",
563"1:30" => "Max 10 characters of Service Identifier",
564"1:40" => "8 Character Envelope Number",
565"1:50" => "Product ID - Max 32 characters",
566"1:60" => "Envelope Priority - 1 numeric characters",
567"1:70" => "Date Sent - 8 numeric characters CCYYMMDD",
568"1:80" => "Time Sent - 11 characters HHMMSS±HHMM",
569"1:90" => "Coded Character Set - Max 32 characters",
570"1:100" => "UNO (Unique Name of Object) - 14 to 80 characters",
571"1:120" => "ARM Identifier - 2 byte binary number",
572"1:122" => "ARM Version - 2 byte binary number",
573
574// Application Record
575"2:00" => "Record Version - 2 byte binary number",
576"2:03" => "Object Type Reference -  3 plus 0 to 64 Characters",
577"2:05" => "Object Name (Title) - Max 64 characters",
578"2:07" => "Edit Status - Max 64 characters",
579"2:08" => "Editorial Update - 2 numeric characters",
580"2:10" => "Urgency - 1 numeric character",
581"2:12" => "Subject Reference - 13 to 236 characters",
582"2:15" => "Category - Max 3 characters",
583"2:20" => "Supplemental Category - Max 32 characters",
584"2:22" => "Fixture Identifier - Max 32 characters",
585"2:25" => "Keywords - Max 64 characters",
586"2:26" => "Content Location Code - 3 characters",
587"2:27" => "Content Location Name - Max 64 characters",
588"2:30" => "Release Date - 8 numeric characters CCYYMMDD",
589"2:35" => "Release Time - 11 characters HHMMSS±HHMM",
590"2:37" => "Expiration Date - 8 numeric characters CCYYMMDD",
591"2:35" => "Expiration Time - 11 characters HHMMSS±HHMM",
592"2:40" => "Special Instructions - Max 256 Characters",
593"2:42" => "Action Advised - 2 numeric characters",
594"2:45" => "Reference Service - Max 10 characters",
595"2:47" => "Reference Date - 8 numeric characters CCYYMMDD",
596"2:50" => "Reference Number - 8 characters",
597"2:55" => "Date Created - 8 numeric characters CCYYMMDD",
598"2:60" => "Time Created - 11 characters HHMMSS±HHMM",
599"2:62" => "Digital Creation Date - 8 numeric characters CCYYMMDD",
600"2:63" => "Digital Creation Time - 11 characters HHMMSS±HHMM",
601"2:65" => "Originating Program - Max 32 characters",
602"2:70" => "Program Version - Max 10 characters",
603"2:75" => "Object Cycle - 1 character",
604"2:80" => "By-Line (Author) - Max 32 Characters",
605"2:85" => "By-Line Title (Author Position) - Max 32 characters",
606"2:90" => "City - Max 32 Characters",
607"2:92" => "Sub-Location - Max 32 characters",
608"2:95" => "Province/State - Max 32 Characters",
609"2:100" => "Country/Primary Location Code - 3 alphabetic characters",
610"2:101" => "Country/Primary Location Name - Max 64 characters",
611"2:103" => "Original Transmission Reference - Max 32 characters",
612"2:105" => "Headline - Max 256 Characters",
613"2:110" => "Credit - Max 32 Characters",
614"2:115" => "Source - Max 32 Characters",
615"2:116" => "Copyright Notice - Max 128 Characters",
616"2:118" => "Contact - Max 128 characters",
617"2:120" => "Caption/Abstract - Max 2000 Characters",
618"2:122" => "Caption Writer/Editor - Max 32 Characters",
619"2:125" => "Rasterized Caption - 7360 bytes, 1 bit per pixel, 460x128pixel image",
620"2:130" => "Image Type - 2 characters",
621"2:131" => "Image Orientation - 1 alphabetic character",
622"2:135" => "Language Identifier - 2 or 3 aphabetic characters",
623"2:150" => "Audio Type - 2 characters",
624"2:151" => "Audio Sampling Rate - 6 numeric characters",
625"2:152" => "Audio Sampling Resolution - 2 numeric characters",
626"2:153" => "Audio Duration - 6 numeric characters",
627"2:154" => "Audio Outcue - Max 64 characters",
628"2:200" => "ObjectData Preview File Format - 2 byte binary number",
629"2:201" => "ObjectData Preview File Format Version - 2 byte binary number",
630"2:202" => "ObjectData Preview Data - Max 256000 binary bytes",
631
632// Pre-ObjectData Descriptor Record
633"7:10"  => "Size Mode - 1 numeric character",
634"7:20"  => "Max Subfile Size",
635"7:90"  => "ObjectData Size Announced",
636"7:95"  => "Maximum ObjectData Size",
637
638// ObjectData Record
639"8:10"  => "Subfile",
640
641// Post ObjectData Descriptor Record
642"9:10"  => "Confirmed ObjectData Size"
643
644);
645
646/******************************************************************************
647* End of Global Variable:     IPTC_Entry_Descriptions
648******************************************************************************/
649
650
651
652
653/******************************************************************************
654* Global Variable:      IPTC_File Formats
655*
656* Contents:     The names of the IPTC-NAA IIM File Formats for field 1:20
657*
658******************************************************************************/
659
660$GLOBALS[ "IPTC_File Formats" ] = array(
66100 => "No ObjectData",
66201 => "IPTC-NAA Digital Newsphoto Parameter Record",
66302 => "IPTC7901 Recommended Message Format",
66403 => "Tagged Image File Format (Adobe/Aldus Image data)",
66504 => "Illustrator (Adobe Graphics data)",
66605 => "AppleSingle (Apple Computer Inc)",
66706 => "NAA 89-3 (ANPA 1312)",
66807 => "MacBinary II",
66908 => "IPTC Unstructured Character Oriented File Format (UCOFF)",
67009 => "United Press International ANPA 1312 variant",
67110 => "United Press International Down-Load Message",
67211 => "JPEG File Interchange (JFIF)",
67312 => "Photo-CD Image-Pac (Eastman Kodak)",
67413 => "Microsoft Bit Mapped Graphics File [*.BMP]",
67514 => "Digital Audio File [*.WAV] (Microsoft & Creative Labs)",
67615 => "Audio plus Moving Video [*.AVI] (Microsoft)",
67716 => "PC DOS/Windows Executable Files [*.COM][*.EXE]",
67817 => "Compressed Binary File [*.ZIP] (PKWare Inc)",
67918 => "Audio Interchange File Format AIFF (Apple Computer Inc)",
68019 => "RIFF Wave (Microsoft Corporation)",
68120 => "Freehand (Macromedia/Aldus)",
68221 => "Hypertext Markup Language - HTML (The Internet Society)",
68322 => "MPEG 2 Audio Layer 2 (Musicom), ISO/IEC",
68423 => "MPEG 2 Audio Layer 3, ISO/IEC",
68524 => "Portable Document File (*.PDF) Adobe",
68625 => "News Industry Text Format (NITF)",
68726 => "Tape Archive (*.TAR)",
68827 => "Tidningarnas Telegrambyrå NITF version (TTNITF DTD)",
68928 => "Ritzaus Bureau NITF version (RBNITF DTD)",
69029 => "Corel Draw [*.CDR]"
691);
692
693
694/******************************************************************************
695* End of Global Variable:     IPTC_File Formats
696******************************************************************************/
697
698/******************************************************************************
699* Global Variable:      ImageType_Names
700*
701* Contents:     The names of the colour components for IPTC-NAA IIM field 2:130
702*
703******************************************************************************/
704
705$GLOBALS['ImageType_Names'] = array(    "M" => "Monochrome",
706                                        "Y" => "Yellow Component",
707                                        "M" => "Magenta Component",
708                                        "C" => "Cyan Component",
709                                        "K" => "Black Component",
710                                        "R" => "Red Component",
711                                        "G" => "Green Component",
712                                        "B" => "Blue Component",
713                                        "T" => "Text Only",
714                                        "F" => "Full colour composite, frame sequential",
715                                        "L" => "Full colour composite, line sequential",
716                                        "P" => "Full colour composite, pixel sequential",
717                                        "S" => "Full colour composite, special interleaving" );
718
719
720
721/******************************************************************************
722* End of Global Variable:     ImageType_Names
723******************************************************************************/
724
725?>
Note: See TracBrowser for help on using the repository browser.