BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-30-2010, 01:22 AM   #1
ankbb
New Member
 
Join Date: Jan 2010
Model: 9000
PIN: N/A
Carrier: RIM
Posts: 5
Default How to get a BitMap from bye[]

Please Login to Remove!

Hi,

I have a String data value (not a resource location) which I had to ultimately use to display an image.I converted this String to a byte[] using the following code :
byteStream = (a.getUserImage()).getBytes();

Used this byte[] further in the function loadBitmap as :

public static Bitmap loadBitmap(byte[] res) {
System.out.println("Inside loadBitmap 1");
EncodedImage img = EncodedImage.createEncodedImage(res,0,res.length);
System.out.println("Inside loadBitmap 2");
return img.getBitmap();
}

but , its the createEncodedImage() method which is not working properly as the second print statement is not showing up.

Is there something wrong with the code here.

Please suggest ASAP.

Thanks in advance.
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


MITSUBISHI FR-PU04 (67735), Parameter Unit: A500/E500, 10-KEY Keypad + Manual... picture

MITSUBISHI FR-PU04 (67735), Parameter Unit: A500/E500, 10-KEY Keypad + Manual...

$209.46



Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP  picture

Mitsubishi FR-A540-0.75K-NA AC DRIVE INVERTER 1 HP 380-480 VAC 50/60 HZ 4.1 AMP

$649.99



Radiomatic Flo-One Beta Radio-Chromatography Detector A-500 Model A525 [E2FL] picture

Radiomatic Flo-One Beta Radio-Chromatography Detector A-500 Model A525 [E2FL]

$245.00



1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ picture

1PC USED A54MA55B BC186A413G52 Mitsubishi A500/F540 Series 55KW Drive Board #CZ

$317.00



MITSUBISHI FR-PU04 (67735), Parameter unit A500/E500, Full 10-Keypad, FRPU04 ... picture

MITSUBISHI FR-PU04 (67735), Parameter unit A500/E500, Full 10-Keypad, FRPU04 ...

$314.46



MITSUBISHI FR-PU04 (67735), Parameter Unit: A500/E500, 10-KEY Keypad | ID2707... picture

MITSUBISHI FR-PU04 (67735), Parameter Unit: A500/E500, 10-KEY Keypad | ID2707...

$189.17







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