Fail to load jpeg image

Bug #1679442 reported by Mattia Rizzolo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned
inkscape (Debian)
Confirmed
Unknown

Bug Description

Originally reported at https://bugs.debian.org/858617

Trying to import the attached .jpg file just fail, with a very vague error message "Failed to load the requested file /path/to/file..". On the terminal only "GdkPixbuf loader failed" is printed.

Importing and re-exporting the image with any bitmap program workarounds the issue.

Reproduced with 0.92.1.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :
Changed in inkscape (Debian):
status: Unknown → Confirmed
jazzynico (jazzynico)
tags: added: bitmap importing
Revision history for this message
jazzynico (jazzynico) wrote :

Not reproduced on Windows 7 (64-bit) with lp:inkscape/0.92.x rev. 15413 (32-bit).
Somewhat reproduced with lp:inkscape rev. 15616 (MSYS2 devlibs, 64-bit). The imported image is empty, and the console shows a bunch of GdkPixbuf errors (see attachments). No error dialog.

Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
Gadget (carlosgadget) wrote :

Same error with photos taken with a Moto G3 cel.

Workaround followed: open photo with Gimp, export as jpg (again) and import into Inkscape.

OS: Ubuntu 18.04 - Inkscape 0.92

Perhaps metadata of original photo causes this issue?

Revision history for this message
Alvin Penner (apenner) wrote :

reproduced on Windows 10, Inkscape 0.92+devel (e1eae41, 2018-11-16)

Dos error message is:
Pixbuf::create_from_file: Error interpreting JPEG image file (Unsupported marker type 0xa0)
   (\windows\temp\img_20161206_163501.jpg)
GdkPixbuf loader failed

Revision history for this message
VladBlanton (vblanton) wrote :

Issue continues. Thank you for Gimp workaround. i had trouble with photos downloaded from my photos.google.com account or drive.google.com backups.

Inkscape 0.92.3 (2405546, 2018-03-11)
Ubuntu 18.10

Revision history for this message
Daniel Stiefelmaier (mail-stiefelweb) wrote :

Also happens with all images from my Pentax camera.
It seems to be the embedded thumbnail.

NOT a fix: recompressing, or removing random EXIF data
gm convert IMG_20161206_163501.jpg -size 10% small.jpg
exiv2 -M"del Exif.Photo.MakerNote" small.jpg

A fix: stripping ONLY the thumbnail
exiv2 -dt *.jpg

However, diff reveals that this moves the metadata section from the front to the back of the file.
So, the real issue might be either the size or the position of the meta data.

Also NOT a fix: stripping thumb from front and appending it to the end
exiv2 -et test.jpg # export to test-thumb.jpg
exiv2 -dt test.jpg # delete thumb
exiv2 -it test.jpg # import from test-thumb.jpg

However, ALSO A FIX: making the thumb smaller:
cp test-thumb.jpg test-thumb.org.jpg
gm convert test-thumb.org.jpg -quality 30% test-thumb.jpg
exiv2 -dt test.jpg # delete old thumb first - it DOES make a difference
exiv2 -it test.jpg

The largest thumbnail that worked was with 43% quality, which is very close to 10KiB.

Revision history for this message
Kiran (kanginthaya) wrote :

I had the same issue importing .jpg images taken from my mobile phone. The GIMP trick worked elegantly!

Revision history for this message
Nathan Lee (nathan.lee) wrote :

Closing as part of migration to GitLab (see https://alpha.inkscape.org/bug-migration/)

I'll copy over new/relevant info from here to https://gitlab.com/inkscape/inbox/issues/964 . Note it was identified as an upstream issue, see https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues/70

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.