mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Add OffsetTime* Exif tags
Closes GH-18237.
This commit is contained in:
3
NEWS
3
NEWS
@@ -63,6 +63,9 @@ PHP NEWS
|
||||
. Added enchant_dict_remove_from_session(). (nielsdos)
|
||||
. Added enchant_dict_remove(). (nielsdos)
|
||||
|
||||
- EXIF:
|
||||
. Add OffsetTime* Exif tags. (acc987)
|
||||
|
||||
- Fileinfo:
|
||||
. Upgrade to file 5.46. (nielsdos)
|
||||
|
||||
|
||||
@@ -151,6 +151,9 @@ PHP 8.5 UPGRADE NOTES
|
||||
- DOM:
|
||||
. Added Dom\Element::$outerHTML.
|
||||
|
||||
- EXIF:
|
||||
. Add OffsetTime* Exif tags.
|
||||
|
||||
- XSL:
|
||||
. The $namespace argument of XSLTProcessor::getParameter(),
|
||||
XSLTProcessor::setParameter() and XSLTProcessor::removeParameter()
|
||||
|
||||
@@ -420,6 +420,9 @@ static char *exif_get_tagformat(int format)
|
||||
#define TAG_EXIFVERSION 0x9000
|
||||
#define TAG_DATE_TIME_ORIGINAL 0x9003
|
||||
#define TAG_DATE_TIME_DIGITIZED 0x9004
|
||||
#define TAG_OFFSET_TIME 0x9010
|
||||
#define TAG_OFFSET_TIME_ORIGINAL 0x9011
|
||||
#define TAG_OFFSET_TIME_DIGITIZED 0x9012
|
||||
#define TAG_COMPONENT_CONFIG 0x9101
|
||||
#define TAG_COMPRESSED_BITS_PER_PIXEL 0x9102
|
||||
#define TAG_SHUTTERSPEED 0x9201
|
||||
@@ -692,6 +695,9 @@ static tag_info_array tag_table_IFD = {
|
||||
{ 0x9000, "ExifVersion"},
|
||||
{ 0x9003, "DateTimeOriginal"},
|
||||
{ 0x9004, "DateTimeDigitized"},
|
||||
{ 0x9010, "OffsetTime"},
|
||||
{ 0x9011, "OffsetTimeOriginal"},
|
||||
{ 0x9012, "OffsetTimeDigitized"},
|
||||
{ 0x9101, "ComponentsConfiguration"},
|
||||
{ 0x9102, "CompressedBitsPerPixel"},
|
||||
{ 0x9201, "ShutterSpeedValue"},
|
||||
|
||||
59
ext/exif/tests/exif028.phpt
Normal file
59
ext/exif/tests/exif028.phpt
Normal file
@@ -0,0 +1,59 @@
|
||||
--TEST--
|
||||
Check for exif_read_data, JPEG with IFD data containg OffsetTime, OffsetTimeOriginal, and OffsetTimeDigitized tags in Motorola byte-order.
|
||||
--EXTENSIONS--
|
||||
exif
|
||||
--INI--
|
||||
output_handler=
|
||||
zlib.output_compression=0
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(exif_read_data(__DIR__.'/image028.jpg'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(17) {
|
||||
["FileName"]=>
|
||||
string(12) "image028.jpg"
|
||||
["FileDateTime"]=>
|
||||
int(%d)
|
||||
["FileSize"]=>
|
||||
int(%d)
|
||||
["FileType"]=>
|
||||
int(2)
|
||||
["MimeType"]=>
|
||||
string(10) "image/jpeg"
|
||||
["SectionsFound"]=>
|
||||
string(13) "ANY_TAG, IFD0"
|
||||
["COMPUTED"]=>
|
||||
array(5) {
|
||||
["html"]=>
|
||||
string(20) "width="1" height="1""
|
||||
["Height"]=>
|
||||
int(1)
|
||||
["Width"]=>
|
||||
int(1)
|
||||
["IsColor"]=>
|
||||
int(1)
|
||||
["ByteOrderMotorola"]=>
|
||||
int(1)
|
||||
}
|
||||
["XResolution"]=>
|
||||
string(5) "300/1"
|
||||
["YResolution"]=>
|
||||
string(5) "300/1"
|
||||
["ResolutionUnit"]=>
|
||||
int(2)
|
||||
["DateTime"]=>
|
||||
string(19) "2025:04:03 00:02:00"
|
||||
["YCbCrPositioning"]=>
|
||||
int(1)
|
||||
["DateTimeOriginal"]=>
|
||||
string(19) "2025:04:03 00:00:00"
|
||||
["DateTimeDigitized"]=>
|
||||
string(19) "2025:04:03 00:01:00"
|
||||
["OffsetTime"]=>
|
||||
string(6) "-02:00"
|
||||
["OffsetTimeOriginal"]=>
|
||||
string(6) "+00:00"
|
||||
["OffsetTimeDigitized"]=>
|
||||
string(6) "-01:00"
|
||||
}
|
||||
BIN
ext/exif/tests/image028.jpg
Normal file
BIN
ext/exif/tests/image028.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 527 B |
Reference in New Issue
Block a user