Re: Problem with raster image scaling in SVG on some iPad/iPhone models

"[email protected] [svg-developers]" <[email protected]> 20 Nov 2014 14:40:42 -0800
Newsgroups gmane.text.xml.svg.devel
Message-ID <[email protected]>
Hi again Domenico,

I think that I've made all the changes you suggested. Unfortunately, the problem of the raster image being scaled improperly on (only) some models of iPad and iPhone has not been fixed.

 1) I've specified the width and height of the image (rather than 100%) 
 2) I've gotten rid of the viewbox attribute 

 3) I've gotten rid of that weird matrix. 

4) I've gotten rid of the preserveAspectRatio attribute. 

I've reworked the entire SVG file to align everything based on x=0, y=0. On the SVG element itself, I now have:
 x="0px" y="0px" viewBox="0 0 5954 3705" enable-background="new 0 0 5954 3705"

On the image element, I now have:
width="5954" height="3705" x="0px" y="0px"

What else can I try, which might be causing some devices to scale the image itself OR the image element (I'm not sure which!) incorrectly?

You mentioned:

 If you do need to experiment with [the preserveAspectRatio attribute] read well the specification.



 
Because the problem is that the devices are scaling the image element differently than the vector elements, I can't help but wonder if that might not help with the issue. In other words, perhaps if I can set the value of the preserveAspectRation attribute, it might help? I have read the specification, but I'm afraid to say that I don't really understand it.

Do you think that might help, or do you suspect something else? If you think it might help, do you have any suggestion of what value I might set it to?

Thanks again,
- Paul