BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 03-09-2011, 08:10 AM   #1 (permalink)
New Member
Join Date: Mar 2011
Model: 9700
Carrier: developer
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add dynamically image in Bitmap Field

Please Login to Remove!


I try to add dynamically Bitmap field but its not working plz help me .

My Code is

			 fc = (FileConnection), Connector.READ);
			rootEnum = fc.list();
             while (rootEnum.hasMoreElements()) 
                file = (String)rootEnum.nextElement();
                imgName=file.substring(0, file.length()-4);
                 DataContext dc=new DataContext();
    			 byte[] data=(byte[])dc.get(imgName.trim());
    			 EncodedImage  eImage = EncodedImage.createEncodedImage(data,0,data.length);
    			 int scaleFactorX = Fixed32.div(Fixed32.toFP(eImage.getWidth()), 
    			 int scaleFactorY = Fixed32.div(Fixed32.toFP(eImage.getHeight()), 
    			 eImage=eImage.scaleImage32(scaleFactorX, scaleFactorY);
    			 bm_img[i] =(Bitmap) eImage.getBitmap(); 
    			 row.add(new BitmapField(bm_img[i]));
    			 row.add(new LabelField(imgName, DrawStyle.ELLIPSIS));
		}catch(Exception e)
Old 03-09-2011, 08:31 AM   #2 (permalink)
Spam Reporter
dc/dc's Avatar
Join Date: Oct 2005
Location: IAD
Model: 6230
Carrier: Voicestream
Posts: 14,530
Post Thanks: 220
Thanked 345 Times in 311 Posts
Default Re: How to add dynamically image in Bitmap Field

You need to check the Developer section.
I h8 txtspk.
Old 03-09-2011, 07:26 PM   #3 (permalink)
Latino Hasta La Muerte
Join Date: Jan 2005
Location: Denville, NJ.
Model: Class
OS: 10.3.1
PIN: 3324918D
Carrier: Verizon
Posts: 9,055
Post Thanks: 52
Thanked 311 Times in 296 Posts
Default Re: How to add dynamically image in Bitmap Field

Carrier: "developer".

Mods: we desperately need a "roll eyes" emoticon.
Closed Thread

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: How to add dynamically image in Bitmap Field
Thread Thread Starter Forum Replies Last Post
How to add Image in TextField manickam Developer Forum 0 06-30-2009 01:38 AM
Sync Error....What could it be? kurrupt_1 General 8300 Series Discussion - Curve 7 11-22-2007 07:41 PM
zoom in the text on the image streamh Developer Forum 3 09-19-2007 02:09 AM
8703e guide techman1 BlackBerry Guides 3 09-28-2006 10:24 AM
8703e guide and all other series of bb techman1 BlackBerry Guides 1 09-21-2006 10:12 PM

Copyright 2004-2014
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.