|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #27591 JPEG 2000 IPTC not found by GetImageSize + iptcparse
Submitted: 2004-03-14 00:42 UTC Modified: 2018-04-03 13:00 UTC
Avg. Score:4.3 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:1 (16.7%)
From: tom at kornack dot com Assigned:
Status: Open Package: GetImageSize related
PHP Version: 5CVS-2004-03-14 (dev) OS: Mac OS X 10.3.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-03-14 00:42 UTC] tom at kornack dot com
JPEG 2000 IPTC blocks are not returned by the 
GetImageSize imageinfo array.

This information is increasingly important with the next 
generation of digital cameras that will call for 
compressed, 16-bit files. 

Reproduce code:
    $filename = "iptctestimage.jp2";
    $size = GetImageSize ($filename,&$info);
    $iptc = iptcparse ($info["APP13"]);
    $title = $iptc["2#105"][0];
    print("Title: ".$title."\n")

A sample JPEG 2000 image file is available here:

This code is also available here:

A sample JPEG that does work is available here:

Expected result:
Title: Title Metadata

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-14 08:44 UTC]

It seems that this jp2 image is broken. None of the tools I used to test can open it, even not the jp2 reference tools.

Which tools have been used to create this file?

 [2004-03-14 12:16 UTC] tom at kornack dot com
Thanks for the speedy response! 

iptctestimate.jp2 was created using Adobe Photoshop and 
the j2k plugin. I have had no problems with these files 
thus far, opening then with OS X native applications, 
web browsers, etc. I have not been able to get tbe 
reference jj2000 application to run on OS X yet. 

Here's a new file to try, created using Graphic 

Pierre: Please let me know which program you'd like me 
to try. Does the code actually work on jp2 files that 
you generate?

 [2016-12-30 18:57 UTC]
-Package: Feature/Change Request +Package: GetImageSize related
 [2018-04-03 13:00 UTC]
> Does the code actually work on jp2 files that you generate?

Most likely not, since the $imageinfo parameter of getimagesize()
is only supported for JFIF images.
 [2018-04-03 13:15 UTC]
Automatic comment from SVN on behalf of cmb
Log: $imageinfo only supports JFIF

See bug #27591.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 12:03:38 2021 UTC