xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kok eng meo" <dstamkok...@gmail.com>
Subject Re: Displaying JPEG file in SVG in batik
Date Fri, 23 Jun 2006 08:34:30 GMT
Hi Thomas,

I have manage to display the jpeg using both the absolute filename and the
relative filename by setting the base URL using the setURLObject method.
Thanks alot for your help! :)


On 6/23/06, kok eng meo <dstamkokeng@gmail.com> wrote:
>
>  Hi Thomas,
>
> Thanks for the reply :) I was still worrying that my problem could not be
> solve.
>
>  >I would suggest that you provide a base URL either by setting the
> xml:base attribute
> >(in the xml namespace), or by calling '
> batik.dom.svg.SVGOMDocument.setURLObject(URL)'
>
>  Yup, I am constructing the SVG document directly from memory. Regarding
> the 2 solutions you have provided, do you mind giving simple examples as to
> how do I set the xml namespace or where to call '
> batik.dom.svg.SVGOMDocument.setURLObject (URL). Actually I am quite new to
> batik and java :p, is there any sites where I can refer to sample batik
> codes to help me learn coding using batik better? Really appreciate your
> help!
>
>
> On 6/22/06, thomas.deweese@kodak.com <thomas.deweese@kodak.com > wrote:
> >
> > Hi Kok Eng Meo,
> >
> >   Please only send messages to one list, in this case the 'users' list
> > since you are not developing Batik, you are developing code that uses
> > Batik.
> >
> > "kok eng meo" <dstamkokeng@gmail.com> wrote on 06/22/2006 03:52:58 AM:
> >
> > > I have tried to create an image Element in batik to display a jpeg
> > file.
> > But
> > > it does not work.
> > > This is my code.
> >
> >     I don't see any obvious problems (points for getting
> > the namespace stuff "first try").
> >
> > > abc.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI , "xlink:href",
> > "picture.jpg");
> >
> > > The error given is an I/O error occurred while processing the URI
> >
> >    Ohh, you just lost the points for not including the I/O
> > error stack trace ;)
> >
> >    I/O error covers a lot, my first guess is that it can't find the
> > JPEG.  If you are constructing the SVG document entirely in memory
> > (nothing read from disk) the document likely has no 'base URL' to
> > resolve relative URL's (like " picture.jpg").  I would suggest that
> > you provide a base URL either by setting the xml:base attribute
> > (in the xml namespace), or by calling
> > 'batik.dom.svg.SVGOMDocument.setURLObject(URL)'
> >
> > > Can someone please advice me on this?? Or is there any other methods
> > to
> > > display a jpeg file inside batik SVGDocument.
> >
> >   No this is it...
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> >
> >
>

Mime
View raw message