You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Hans <ha...@webspeed.dk> on 2006/09/19 17:04:29 UTC

Image tag inside svg

Hi

I have a strange problem - probably because I'm a complete novice.

I have an SVG-file with an internal image which have a transformation
matrix.
When I load this in an IE-browser it looks ok.

But when I put it in a batik JSVGCanvas the image-parts gets a wrong
aspect-ratio.
The problem does not occur when the transformation matrix is like (100 0 0
100 ...
What have I overlooked?

Can I opload the example file like this?
http://www.nabble.com/file/31/319009346.801.svg 319009346.801.svg 

Best regards
Hans
-- 
View this message in context: http://www.nabble.com/Image-tag-inside-svg-tf2299629.html#a6390239
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Image tag inside svg

Posted by Hans <ha...@webspeed.dk>.
Thanks a lot Thomas - that worked nicely.
I appreciate your help!


thomas.deweese wrote:
> 
> Hi Hans,
> 
>   See below...
> 
> Hans <ha...@webspeed.dk> wrote on 09/20/2006 04:28:18 AM:
> 
>> > I have a strange problem - probably because I'm a complete novice.
>> > 
>> > I have an SVG-file with an internal image which have a transformation
>> > matrix.
>> > When I load this in an IE-browser it looks ok.
>> > 
>> > But when I put it in a batik JSVGCanvas the image-parts gets a wrong
>> > aspect-ratio.
>> > The problem does not occur when the transformation matrix is like (100 
> 0 0
>> > 100 ...
>> > What have I overlooked?
> 
>     The Adobe viewer never implemented the attribute
> 'preserveAspectRatio' (PAR).  Even more bizarrely the
> default behavior they use is that of setting PAR to
> 'none'.  Batik correctly implements PAR with it's
> default value of 'meet xMidYMid'.  I suspect you will
> get your desired rendering if you set the PAR attribute
> on the image element with a value of 'none'.
> 
>> > Can I opload the example file like this?
>> >  http://www.nabble.com/file/31/319009346.801.svg 319009346.801.svg 
>> > 
>> > Best regards
>> > Hans
>> > 
>> 
>> -- 
>> View this message in context: 
> http://www.nabble.com/Image-tag-inside-svg-
>> tf2299629.html#a6403558
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Image-tag-inside-svg-tf2299629.html#a6425545
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Image tag inside svg

Posted by th...@kodak.com.
Hi Hans,

  See below...

Hans <ha...@webspeed.dk> wrote on 09/20/2006 04:28:18 AM:

> > I have a strange problem - probably because I'm a complete novice.
> > 
> > I have an SVG-file with an internal image which have a transformation
> > matrix.
> > When I load this in an IE-browser it looks ok.
> > 
> > But when I put it in a batik JSVGCanvas the image-parts gets a wrong
> > aspect-ratio.
> > The problem does not occur when the transformation matrix is like (100 
0 0
> > 100 ...
> > What have I overlooked?

    The Adobe viewer never implemented the attribute
'preserveAspectRatio' (PAR).  Even more bizarrely the
default behavior they use is that of setting PAR to
'none'.  Batik correctly implements PAR with it's
default value of 'meet xMidYMid'.  I suspect you will
get your desired rendering if you set the PAR attribute
on the image element with a value of 'none'.

> > Can I opload the example file like this?
> >  http://www.nabble.com/file/31/319009346.801.svg 319009346.801.svg 
> > 
> > Best regards
> > Hans
> > 
> 
> -- 
> View this message in context: 
http://www.nabble.com/Image-tag-inside-svg-
> tf2299629.html#a6403558
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Image tag inside svg

Posted by Hans <ha...@webspeed.dk>.
Hi again

Ok, I see I forgot namespace for xlink - but inserting that (in svg tag)
makes no difference.

Hans


Hans wrote:
> 
> Hi
> 
> I have a strange problem - probably because I'm a complete novice.
> 
> I have an SVG-file with an internal image which have a transformation
> matrix.
> When I load this in an IE-browser it looks ok.
> 
> But when I put it in a batik JSVGCanvas the image-parts gets a wrong
> aspect-ratio.
> The problem does not occur when the transformation matrix is like (100 0 0
> 100 ...
> What have I overlooked?
> 
> Can I opload the example file like this?
>  http://www.nabble.com/file/31/319009346.801.svg 319009346.801.svg 
> 
> Best regards
> Hans
> 

-- 
View this message in context: http://www.nabble.com/Image-tag-inside-svg-tf2299629.html#a6403558
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org