Convert bitmap to base64 string in blackberry
问题 I have an image which needs to be sent to the server. Is there a way to convert a bitmap(jpg) to base64 string in blackberry? 回答1: What you request is a bit vague and odd, however I hope this can help: With the following piece code it's possible to get a JPEG binary data for a Bitmap (note, it is a compressed one, so the size of the data is as small as possible if compare to raw bitmap): Bitmap bmp = ...; // your bitmap int quality = 85; EncodedImage encodedImg = JPEGEncodedImage.encode(bmp,