New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdalinfo fails for jpg/jpeg on Windows #3284
Comments
Some quick tests:
|
I see that OSGeo4W uses the internal libjpeg (6-b) of GDAL, and I believe (not completely sure) gisinternals.com, also does. I've tried on Linux a build with internal libjpeg, and I manage to read the image. So, I'm not completely sure why this happens on OSGeo4W builds. Wondering if it might not be a conflict between the symbols of the internal libjpeg in GDAL and an external libjpeg that would be a dependency of a library that GDAL would link against too. CC @jef-n |
Gisinternals do not list libjpeg as dependency https://gisinternals.com/packageinfo.php?file=release-1911-x64-gdal-mapserver.zip. Mayby that means that internal jpeg of GDAL is used. |
@rouault @jratike80 thanks for looking into this. FWIW the error message varies (using the same setup for different images). Here are two other error messages:
|
On Windows 10 64 bit, GDAL 3.0.2 (OSGeo4W gdal-3.0.2-3) and GDAL 3.0.3 (OSGeo4W gdal-3.0.3-2) succeed to open the provided jpeg file:
while GDAL 3.0.4 (OSGeo4W gdal-3.0.4-2) fails:
On both OSGeo4W installation, libjpeg and libjpeg12 version 6b (libjpeg-6b-4, libjpeg12-6b-4) are installed. The difference I see between 3.0.2/3.0.3 and 3.0.4 is that for 3.0.2/3.0.3 gdal300.dll is linked to jpeg.dll (from libjpeg-6b-4), while for GDAL 3.0.4 gdal300.dll doesn't use jpeg.dll. |
It seems the same happens (on Windows 10 64 bit / OSGeo4W 64 bit) with GDAL 3.2.0dev/3.3.0dev and GDAL 3.1.0: |
I've reported the issue to the OSGeo4W tracker: https://trac.osgeo.org/osgeo4w/ticket/654 |
https://trac.osgeo.org/osgeo4w/ticket/654 is indicated as fixed. Thanks @jef-n |
Expected behavior
gdalinfo
doesn't error for the following jpg: sample_jpg.zipActual behavior
gdalinfo
errors withSteps to reproduce the problem.
gdalinfo 004.JPG
Operating system
Windows 10
GDAL version and provenance
GDAL 3.1.4 installed with OSGeo4W Shell along with QGIS 3.16.1
This happens for a lot of different images captured with different devices.
Using GDAL 2.4.0 on Linux (Debian) installed with QGIS 3.16.1
gdalinfo
shows no error.Also with several image viewers (e.g. GIMP) the sample jpg works flawlessly and it's possible to show the EXIF data.
The text was updated successfully, but these errors were encountered: