08-10-2010 08:19 AM
I searched the forums, tried example code but nothing will work. Now that's that's out the way...
I am developing an application targeting OS version 4.5.x that allows users to view scanned images that are in PNG format. The PNG files are 1728 * 1093 pixels at 204 x 98 DPI with a bit depth of 1 (monochrome/Black & white)
The files are approx 40-50K in size. I want to simply display the image on the screen larger then screen size and be able to pan the image around, horz and vertical scroll. Seems easy doesn't it...dont' get too excited yet...
ALL of the examples I see working with images seem to want you to extract a Bitmap from the source image. I tried the ScrollableImageField example class found elsewhere in the forums and it's too SLOW. The issue is that EncodedImage.getBitmap() is too SLOW. In fact it's pretty bad when I have to make a dialog to the user "Your image is now loading, you may holster your device and I will buzz you when it's ready to view!".. When I convert the 43K PNG to a Bitmap the bitmap object is approx 250K so I assume this is too large for a B.B?
I have also tried creating a BitmapField object and use BitmapField.setBitmap(EncodedImage). This seems the fastest way and avoids the EncodedImage.getbitmap() HOWEVER I cannot scroll a BitmapField.
urrgggggg I want to pull my hear out....or build this app for a newer OS/device, but I must make this work.
Solved! Go to Solution.
08-11-2010 05:42 PM
Doe the images need to stay that large? What about reducing their resolution first?
Rotate and scale bitmaps