07-20-2010 03:57 PM
I am having issues re-sizing my image. I click an image using the camera and store it in the pictures folder. When I retrieve the image I see the image on the screen but I want it to be smaller since it occupies the entire screen and more and I have to scroll down. I added the code to scaleImage, (see the red coded linebelow) but no luck. Am I doing something wrong? - Thank you.
EncodedImage image = EncodedImage.createEncodedImage(dataArray, 0, dataArray.length
BitmapField bitmapField = new BitmapField();
Solved! Go to Solution.
07-20-2010 04:10 PM
scaleImage32 used a Fixed32 number. This means you either need to called Fixed32.toFP(*num*) or the code equivilant which is *num* * 65536 (0x10000).
The documentation should explain it pretty well.
07-20-2010 04:17 PM
I changed the image.scaleImage32(1,1) to image.scaleImage32(100,100) and still no luck. Maybe I dont understand how scaling works. I thought the bigger the number the smaller the size. Any thoughts would be appreciated. Thanks.
07-20-2010 04:19 PM
sorry, I was reading the document as you wrote a reponse. I still can't figure it out, I want to reduce the image to 50% of it's size. I dont know how to call Fixed32.toFP(), is that a function call in the image? - Thanks for your time.
07-20-2010 04:30 PM
Take a look at net.rim.device.api.math.Fixed32. Or, when you read documentation on encodedImage.scaleImage32, click on one of the Fixed32 links (should be easy ).