显示下拉菜单

Test of read_exif_data() 本页面仅提供英文版本。

Example #1 : test not validated (platform dependant or random result etc.)
Example #2 : test success
Example #3 : test not validated (platform dependant or random result etc.)
Example #1
$input = [
  
=> '/tmp/flower.jpg',
  
=> 'IFD0',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'array' => [
      
'FileName' => 'flower.jpg',
      
'FileDateTime' => 1713429155,
      
'FileSize' => 28037,
      
'FileType' => 2,
      
'MimeType' => 'image/jpeg',
      
'SectionsFound' => 'ANY_TAG, IFD0, EXIF',
      
'COMPUTED' => [
        
'html' => 'width="360" height="386"',
        
'Height' => 386,
        
'Width' => 360,
        
'IsColor' => 1,
        
'ByteOrderMotorola' => 0,
      ],
      
'Model' => 'Test 1',
      
'SamplesPerPixel' => 162,
      
'XResolution' => -2,
      
'YResolution' => '-2/3',
      
'Exif_IFD_Pointer' => 90,
      
'DateTimeOriginal' => '2000:12:31 23:59:59',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> '/tmp/flower.jpg',
  
=> 'COMMENT',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => false,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> '/tmp/legs.jpg',
  
=> 'THUMBNAIL',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'array' => [
      
'FileName' => 'legs.jpg',
      
'FileDateTime' => 1713429155,
      
'FileSize' => 38503,
      
'FileType' => 2,
      
'MimeType' => 'image/jpeg',
      
'SectionsFound' => 'ANY_TAG, IFD0, THUMBNAIL, EXIF',
      
'COMPUTED' => [
        
'html' => 'width="320" height="320"',
        
'Height' => 320,
        
'Width' => 320,
        
'IsColor' => 1,
        
'ByteOrderMotorola' => 0,
        
'ApertureFNumber' => 'f/11.3',
        
'Thumbnail.FileType' => 2,
        
'Thumbnail.MimeType' => 'image/jpeg',
      ],
      
'Make' => 'Canon',
      
'Model' => 'Canon EOS 5D',
      
'Orientation' => 0,
      
'XResolution' => '4718592/65536',
      
'YResolution' => '4718592/65536',
      
'ResolutionUnit' => 2,
      
'Software' => 'Picasa 3.0',
      
'DateTime' => '2008:06:16 23:57:18',
      
'HostComputer' => 'Mac OS X 10.4.9',
      
'YCbCrPositioning' => 1,
      
'Exif_IFD_Pointer' => 242,
      
'THUMBNAIL' => [
        
'Compression' => 6,
        
'XResolution' => '72/1',
        
'YResolution' => '72/1',
        
'ResolutionUnit' => 2,
        
'JPEGInterchangeFormat' => 546,
        
'JPEGInterchangeFormatLength' => 9230,
      ],
      
'ExposureTime' => '1/50',
      
'ExposureProgram' => 1,
      
'ISOSpeedRatings' => 320,
      
'ExifVersion' => '0220',
      
'DateTimeOriginal' => '2008:06:10 07:59:26',
      
'DateTimeDigitized' => '2008:06:10 07:59:26',
      
'ApertureValue' => '7/1',
      
'ExposureBiasValue' => '0/1',
      
'MeteringMode' => 5,
      
'Flash' => 16,
      
'FocalLength' => '24/1',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]