Preview of bitmap image in file chooser no longer displays its dimensions (width x height) (rev >= 13641)

Bug #1485831 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico

Bug Description

Since the merge of the experimental branch, the preview image of a selected bitmap image in the Gtk+ file chooser dialog no longer displays the image's dimensions ( width x height ) in the upper left corner (only the 'x' of the text object in the SVG template is visible).

Reproduced with Inkscape 0.91+devel r14308 on Ubuntu 14.04 LTS and OS X 10.7.5.

Based on tests with archived builds (on OS X):
- not reproduced with 0.91+devel rev <= 13638,
- reproduced with 0.91+devel rev >= 13646;
this regression is likely a side-effect of changes in the experimental branch (to improve the preview image in the 'Templates...' dialog), merged into trunk in r13641:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13641

Revision history for this message
su_v (suv-lp) wrote :
tags: removed: bitmap
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP (32bit) with Inkscape trunk rev. 14304, GTK dialogs.
Not reproduced with the native dialogs.

Changed in inkscape:
status: New → Triaged
jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested on Windows XP (known bug, SVG files don't show in the templates dialog's preview) and Xubuntu 15.04, Inkscape trunk rev. 14304.

The patch also enables size calculation for SVG files in the Open/Import dialog.
Any reason why it's not currently the case?

Revision history for this message
su_v (suv-lp) wrote :

Testing patch on OS X 10.7.5 (with GTK+/X11 as well as with GTK+/Quartz backend, both use the Gtk+ file chooser dialog):
- ok for bitmap images
- for SVG documents:

Seems to work as expected if the file has at least a viewBox attribute. Files which have
- no width, no viewBox
- no height, no viewBox
- no width, no height, no viewBox
attribute on the top-level <svg> element produce these additional warnings (from librsvg) for the preview image:

(inkscape:74119): glibmm-WARNING **: Glib::Error::throw_exception():
  unknown error domain 'rsvg-error-quark': throwing generic Glib::Error exception

** Message: Caught ... in SVGPreview::showImage

There is no preview generated either, but that happens without or with patch; the failure however is silent wrt console messages without the patch. I had these files still lying around from investigating bug #1461346 and bug #1463623).

Revision history for this message
su_v (suv-lp) wrote :

Just an idea: the dimensions displayed for SVG files might benefit from additional formatting (rounding maybe, e.g. to 3 decimal places?) - some files may use a higher precision (after the decimal point) for width/height.

Revision history for this message
jazzynico (jazzynico) wrote :

New patch, with size message disabled for SVG files preview in the open/import dialogs (still activated for New from template).

Revision history for this message
su_v (suv-lp) wrote :

Second patch tested successfully with Inkscape 0.91+devel r14308 on OS X 10.7.5.

Revision history for this message
jazzynico (jazzynico) wrote :

Regression fixed rev. 14310.

Changed in inkscape:
milestone: 0.92 → none
status: In Progress → Fix Released
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.