Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

ezexifimageanalyzer.php
Go to the documentation of this file.
1 <?php
18 class eZEXIFImageAnalyzer
19 {
23 function process( $mimeData, $parameters = array() )
24 {
25 $printInfo = false;
26 if ( isset( $parameters['print_info'] ) )
27 $printInfo = $parameters['print_info'];
28
29 $filename = $mimeData['url'];
30 if ( file_exists( $filename ) )
31 {
32 if ( function_exists( 'exif_read_data' ) )
33 {
34 $exifData = @exif_read_data( $filename, "COMPUTED,IFD0,COMMENT,EXIF", true );
35 if ( $exifData )
36 {
37 $info = array();
38 if ( isset( $exifData['COMPUTED'] ) )
39 {
40 foreach ( $exifData['COMPUTED'] as $key => $item )
41 {
42 if ( strtolower( $key ) == 'html' )
43 continue;
44 $info[$key] = $exifData['COMPUTED'][$key];
45 }
46 }
47 if ( isset( $exifData['IFD0'] ) )
48 {
49 $info['ifd0'] = $exifData['IFD0'];
50 }
51 if ( isset( $exifData['EXIF'] ) )
52 {
53 $info['exif'] = $exifData['EXIF'];
54 }
55 return $info;
56 }
57 }
58 }
59 return false;
60 }
61
62 }
63
64 ?>
eZEXIFImageAnalyzer
Analyzes image formats which can contain EXIF information.
Definition: ezexifimageanalyzer.php:19
eZEXIFImageAnalyzer\process
process( $mimeData, $parameters=array())
Definition: ezexifimageanalyzer.php:23
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.