Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Graphics.getImage()
Graphics.getImage() [message #134488] Fri, 29 May 2009 13:35 Go to next message
Eclipse UserFriend
Originally posted by: m.schnelle.msit-solutions.com

Hello,

im trying to load Images from an InputStream via
Graphics.getImage(path,inputstream);
The first image which is loaded looks fine but the second one shows
always the first image.
It seem that Graphics.getImage is caching the first loaded image.
Is there a way flush the cache, if one exists.
Or give it a better way to load external Images into RAP applications?

Thanks and Greetings, Markus
Re: Graphics.getImage() [message #134502 is a reply to message #134488] Fri, 29 May 2009 13:39 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi Markus,

you should be sure to use different paths for different InputStreams.
If you do not use different paths you end up updating the same image
with the content of the new stream.

Cheers
Benny

Markus Schnelle wrote:
> Hello,
>
> im trying to load Images from an InputStream via
> Graphics.getImage(path,inputstream);
> The first image which is loaded looks fine but the second one shows
> always the first image.
> It seem that Graphics.getImage is caching the first loaded image.
> Is there a way flush the cache, if one exists.
> Or give it a better way to load external Images into RAP applications?
>
> Thanks and Greetings, Markus


--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
Re: Graphics.getImage() [message #134624 is a reply to message #134502] Tue, 02 June 2009 07:09 Go to previous message
Eclipse UserFriend
Originally posted by: m.schnelle.msit-solutions.com

Hi Benjamin,

thx now it works fine with the different paths.
What i didn't understand is. why the image wasn't update throw
the new stream.

Cheers, Markus



Benjamin Muskalla schrieb:
> Hi Markus,
>
> you should be sure to use different paths for different InputStreams.
> If you do not use different paths you end up updating the same image
> with the content of the new stream.
>
> Cheers
> Benny
>
> Markus Schnelle wrote:
>> Hello,
>>
>> im trying to load Images from an InputStream via
>> Graphics.getImage(path,inputstream);
>> The first image which is loaded looks fine but the second one shows
>> always the first image.
>> It seem that Graphics.getImage is caching the first loaded image.
>> Is there a way flush the cache, if one exists.
>> Or give it a better way to load external Images into RAP applications?
>>
>> Thanks and Greetings, Markus
>
>
Previous Topic:SelectionListener#widgetDefaultSelected isn't called when enter key is pressed on a combo
Next Topic:I18N problems
Goto Forum:
  


Current Time: Mon Dec 06 21:34:10 GMT 2021

Powered by FUDForum. Page generated in 0.02140 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top