BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-21-2007, 02:07 AM   #1
Cycom
New Member
 
Join Date: May 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 6
Default Getting Image from BitmapField

Please Login to Remove!

Hi.

I'm wondering is any way to get an image in any form that was modified in BitmapField?

May be I've got not very good application architecture, that I'm need such functionality? But I see getText method in TextFiled, and I'm wondering why I can't get image?

I want to do next thing:
1. I have a CLDC application with Bitmap field that shows a bitmap image.
2. I have to draw some additional graphics on that bitmap and I do so.
3. I have to save modified image to file system or send it.
An I have problems with getting this image back.

Can someone give me an advice how it could be done?

Thank you,
Cycom
Offline  
Old 05-21-2007, 02:59 AM   #2
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

to set your edited bitmap to the bitmapField you must surely draw it to a bitmap first? ie. you can't draw directly to the bitmapfield - you must be drawing to a bitmap somewhere so why not just cache or save this?
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 05-21-2007, 04:13 AM   #3
Cycom
New Member
 
Join Date: May 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 6
Default

jfisher, thank you for reply but it is not clear for me what I have to do.

I'm using JDE 4.2.1.40. In BitmapField class I see method paint(Graphics g);
So I can override this method in my class and paint directly at BitmapFiled and I do so.

I do not see a possibility to paint at Bitmap itself.

Could you, please help me?

Thank you,
Cycom

Last edited by Cycom; 05-21-2007 at 04:20 AM..
Offline  
Old 05-21-2007, 04:28 AM   #4
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

aah i see. instead of drawing straight to the bitmapfield draw to a bitmap and then populate the bitmap field for display:

Bitmap myBitmap = new Bitmap(240, 100);
BitmapField myBitmapField = new BitmapField(myBitmap, BitmapField.FOCUSABLE);
Graphics myGraphics = new Graphics(myBitmap);

myGraphics.setColor(0xFF0000);
myGraphics.fillRect(10, 20, 10, 10);
myGraphics.drawText("myText", 20, 5);

myBitmapField.setBitmap(myBitmap);
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 05-21-2007, 09:58 AM   #5
Cycom
New Member
 
Join Date: May 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 6
Default

Thank you, now it is works much better.

One more quersion.
Is any way to convert that Bitmap to EncodedImage to save or scale at screen?

Thank you,
Cycom

Last edited by Cycom; 05-21-2007 at 09:59 AM..
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


DELL OEM 17

DELL OEM 17" TILT LCD MONITOR STAND E173FPf

$10.00



VESA Adapter Plate - Dell E-Series Monitor VESA OEM picture

VESA Adapter Plate - Dell E-Series Monitor VESA OEM

$16.11



NEW Genuine Dell OEM PVA080F12H AUB0812HHD 5-Pin 4-Wire Fan X9KVX 725Y7 9DVNN picture

NEW Genuine Dell OEM PVA080F12H AUB0812HHD 5-Pin 4-Wire Fan X9KVX 725Y7 9DVNN

$15.95



LOT OF 250 NEW HIGH QUALITY 3 Prong OEM Power Cord Mickey Mouse for Dell HP picture

LOT OF 250 NEW HIGH QUALITY 3 Prong OEM Power Cord Mickey Mouse for Dell HP

$349.95



OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5 picture

OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5

$13.00



Dell PowerEdge R230 Mini-SAS HD 8643 to Mini-SAS SFF-8087 PN-0457CH “OEM Pulls” picture

Dell PowerEdge R230 Mini-SAS HD 8643 to Mini-SAS SFF-8087 PN-0457CH “OEM Pulls”

$999.99







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