java - Image Browser in blackberry -
I want to create an image browser for my application where the user can select the image that he wants from the phone I am reading each image from the phone like this:
file connection file connection = (file connection) connector. Open (string) imm.elementAt (i)); Inputstream input stream = file connection. OpenInstream (); Byte [imageBytes = new byte [(int) file connection. File size ()]; InputStream.read (imageBytes); InputStream.close (); FileConnection.close (); Encoded image image = encoded image. Create encoded images (imagebits, 0, -1); Encoded Image Image 1 = Scale Image Encoded. Scale Image (Image, (Int.) (Display Gate Width) / 4) -10, (Int) (Display.Gate Wideth) / 4) -10); BrowseBitmapField field = (BrowseBitmapField) manager.getField (i); Field.setBitmap (image1.getBitmap ()); Field.setEncodedImage (Image); When there were many pictures in the phone, this process was done very slowly by BCOM and the phone needs a lot of time to get them. Is there a faster way to read and display an image from the memory of the phone?
Thanks in advance
The person posting the URL below thought to you You can get thumbnails from BBThumbs.dat and post some code. I have not tried myself, but if it works then saving should be very important.
Comments
Post a Comment