Hello Jon,

On Friday 29 May 2009, 11:46, Jon Garate wrote:
> So far I managed to get it working specifying a local filesystem path
> (file://...) in the ImageURL value. Anybody got any clue on how to achieve
> this for a picture in a website? The solution doesn't necessarily involve
> ImageURL, constructing a Graphic or any other actually successful method
> will also do the job.

the com.sun.star.graphic.GraphicProvider seems to be able to get the image 
from internet. For example:


Sub query_Graphic_From_HTTP
        Dim oGraphicProvider, oGraphic, s$
        oGraphicProvider = 
createUnoservice("com.sun.star.graphic.GraphicProvider")
        s = "http://www.info.unlp.edu.ar/images/logo.gif";
        
        Dim aMediaProperties(0) as New com.sun.star.beans.PropertyValue
        aMediaProperties(0).Name = "URL"
        aMediaProperties(0).Value = s

        oGraphic = oGraphicProvider.queryGraphicDescriptor(aMediaProperties)
End Sub

then use the "Graphic" transient property, that expects a css.graphic.XGraphic

I have no idea if the GraphicProvider will work on every internet situation (a 
secure connection, autentification, etc), so you may try some Java API to get 
the internet image's bytes, and then construct a css.graphic.XGraphic.

Regards
Ariel

PD: this question is better asked in [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to