Sunday, February 11, 2007

image problem

the image problem has been solved in the rss reader, the image was not getting completely downloaded , now this problem is solved by opening an inputStream from the httpCoonector provided by sun,s j2me and then creating a Image using
Image.createImage(InputStream) ;
the previous method that was being used was to first download the bytes of the image , store the
byte in an array and then create an image using the ByteArray
Image.createImage(ByteArray);

the above code is not perfect in syntax but just displays the concept of what was done to treat the image problem.

the other problem was that when an image is encountered the program used to hang.
This problem was solved by downloading the image in the background using a seperate thread.

No comments: