02-04-2011 04:33 PM
How can I generate a thumbnail from a byte - not from an image file?
I store images in data store & want to create a thumbnail directly from the byte data.
Solved! Go to Solution.
02-04-2011 04:51 PM
Take a look at Bitmap.createBitmapFromBytes(...) http://www.blackberry.com/developers/docs/5.0.0api
Looks like it should do exactly what you want as long as you know the full size of the image already, or don't care to have all of the thumbs be the same size.
02-07-2011 10:52 AM
I'm looking for a way to create a small image size, like png icon.
When I create the bitmap it's still the same size as the original.
How to create a 125x125 pixel image that's low density?
02-07-2011 11:04 AM
Take a look at this post:
02-07-2011 07:11 PM
getARGB() would probably work.
One other thing you can do is :
JPEGEncodedImage jpg = JPEGEncodedImage.encode(scaledBMP, 100);
byte data = jpg.getData();
PNGEncodedImage has that too.
Then you'd be storing as a jpg or png.