BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-16-2008, 05:00 PM   #1
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default Scaling a portion of a bitmap

Please Login to Remove!

Is there any way to convert a Bitmap back to an EncodedImage in order to scale it?

I have a large bitmap created from an EncodedImage. I scaled it fine and displayed it. The next step is to draw the same bitmap starting at a specified x and y, but I need to scale it too. The drawBitmap allows me to draw starting at a specified destination (ie. x,y) but the scaling is part of the EncodedImage. How do I translate the portion of the bitmap back to an Image in order to scale it?
Or is there another way to do this.

Any help will be appreciated.

Thanks
Offline  
Old 05-19-2008, 02:49 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

you can create an array from the bitmap, rework the array according to your wishes and build a new image from it.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 05-19-2008, 09:53 AM   #3
rab1
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 25
Default

Quote:
Originally Posted by simon.hain View Post
you can create an array from the bitmap, rework the array according to your wishes and build a new image from it.
THe question I still have, is that how can I access the data ( given an offset) from the bitmap so that I can build a new Image.

For example I would like to access the data in the bitmap starting at (x= 50, y =50). I need to read the data in a byte array so that I can manipulate it using EncodedImage. How to access/read the data back from the bitmap.

Thanks
Offline  
Old 05-19-2008, 12:03 PM   #4
richard.puckett
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Default

getARGB will give you the data array. You can then use the width and height of the bitmap to step through that data however you want.
__________________
Do your homework and know how to ask a good question.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


VEVOR 7.5KW 10HP Variable Frequency Drive Inverter Convert 1 To 3 Phase VFD 220V picture

VEVOR 7.5KW 10HP Variable Frequency Drive Inverter Convert 1 To 3 Phase VFD 220V

$162.99



VEVOR 1.5KW 2HP Variable Frequency Drive Inverter 1 to 3 Phase VSD VFD 7A 220V picture

VEVOR 1.5KW 2HP Variable Frequency Drive Inverter 1 to 3 Phase VSD VFD 7A 220V

$58.99



Single To 3 Phase 7.5KW 10HP 220V Variable Frequency Drive Inverter CNC VFD VSD picture

Single To 3 Phase 7.5KW 10HP 220V Variable Frequency Drive Inverter CNC VFD VSD

$165.90



1000W Car Power Inverter Sine Wave Inverter DC 12V to AC 110V Boat Caravan picture

1000W Car Power Inverter Sine Wave Inverter DC 12V to AC 110V Boat Caravan

$30.99



LENZE E82EV751_4B INVERTER 0.75kW 0-400/500V USED DRIVE picture

LENZE E82EV751_4B INVERTER 0.75kW 0-400/500V USED DRIVE

$288.88



VEVOR 4KW 220V 5HP Variable Frequency Drive Converter VFD Inverter 1 To 3 Phase picture

VEVOR 4KW 220V 5HP Variable Frequency Drive Converter VFD Inverter 1 To 3 Phase

$119.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.