Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 10
Registered: ‎09-14-2008
My Device: Not Specified

Is it possible to flush an Encodedimage ?

Hi

The application prototype I am currently writting download and image via HTTP and displays it on screen.

In one case I can control the size of the downloaded image, so I change the cgi HTTP genereted image to get the right sized image from the server.

In this case everything is ok.

 

With another CGI I can not control the size of the image so I have to resize it on the handheld ( :-( )

 

I use EncodedImage.createEncodedImage to create the image.

 

When switching CGI (thus changine image size) if set the EncodedImage to null to (try to) flush it. 

I see the object value is set to null in the watch view.

The next  EncodedImage.createEncodedImage with the bigger data throws an IllegalArgumentException exception.

 

Am I doing something wrong ?

Is there another way to flush the image ? 

 

thx for any comments .. I'am quite stuck ... or tired enough no to see an obvious solution  :-) 

New Developer
Posts: 10
Registered: ‎09-14-2008
My Device: Not Specified

Re: Is it possible to flush an Encodedimage ?

NOT AN ISSUE.

problem solved .. the CGI sent me a strange stream. this stream displayed correctly in a web browser as an image but could not be processed by createEncodedImage