Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
jllarraz
Posts: 69
Registered: ‎08-13-2008
My Device: Not Specified
Accepted Solution

BlackBerryContact Photo to EncodedImage

Hi, i want to get a EncodedImage from the byte[] photo in the BlackBerryContact, How can i do this?

when i try to do it, an Illegal argumet exception is throws by the createEncodedImage(byte[] b,int offset, int length) ;

i invoke it in this way

 

 

byte[] binary = contact.getBinary(BlackBerryContact.PHOTO, BlackBerryContact.ATTR_NONE); EncodedImage imagen=EncodedImage.createEncodedImage(binary,0,binary.length);

 

 

 

thanks

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: BlackBerryContact Photo to EncodedImage

This is caused by an issue with the BlackBerry handheld software.  It has been resolved in BlackBerry handheld software version 4.5.0.28 and higher.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker