Scaling of bitmaps different in Inkscape and browsers

Bug #1003352 reported by texnic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

I've imported a PDF page with a bitmap figure, ungrouped it and deleted everything except for the figure and the caption. I've also applied some horizontal scaling to it. Then I added a few objects on top of it with Inkscape (actually Matlab > plot2svg > edit in Inkscape).

The saved SVG doesn't render the same way in Inkscape and in web-browsers: the underlying bitmap is not matching the stuff I drew on top of it in the browsers. (In the attached file, the horizontal widths of the b/w and colour subplots should be equal.) The PNG export works fine (things coincide).

Inkscape 0.48.2 r9819, Windows 7 Pro 64 bit.
Google Chrome 19.0.1084.46 m
Internet Explorer 9.0.8112.16421

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

The embedded bitmap image (width = height = 1) which renders in a different size is actually used as (inverted) mask on a rectangle within a scaled group.

AFAICT a duplicate of (or related to)
Bug #461467 in Inkscape: “Image scale saved incorrectly”
<https://bugs.launchpad.net/inkscape/+bug/461467>

See also:
Bug #616717 “Resized bitmap images are rendered differently by Firefox or Batik ('preserveAspectRatio' attribute not set)”
<https://bugs.launchpad.net/inkscape/+bug/616717>
Bug #924377 “wrong default value for image preserveAspectRatio”
<https://bugs.launchpad.net/inkscape/+bug/924377>

tags: added: masking transformations
removed: scaling
Revision history for this message
su_v (suv-lp) wrote :

Adding
         preserveAspectRatio="none"
to the bitmap image in the <mask> element fixes the reported issue.

Linking as duplicate to bug #616717.

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.