0

I need to convert a Bitmap to byte array(byte[]). Some suggest that using Bitmap.getRGB656(...) could solve my problem. How am I going to use that method if it returns nothing? Is the parameter for byte[] in that method will hold the byte array of my Bitmap? How about the other parameters?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Jj Tuibeo
  • 773
  • 4
  • 18
  • I'm not sure if this is about the same `Bitmap` class, but the idea will be the same: http://stackoverflow.com/questions/5669501/how-to-get-rgb-values-of-bitmap-in-android – Martijn Courteaux Dec 28 '12 at 09:26
  • 2
    @MartijnCourteaux, unfortunately, BlackBerry has its own `Bitmap` class, so that answer isn't portable. Such is "Java ME" software development :( – Nate Dec 29 '12 at 03:58
  • 1
    Check this out(http://stackoverflow.com/questions/14117569/convert-bitmap-to-base64-string-in-blackberry/14131938#14131938), much faster conversion of bitmap to byte[]. – Jj Tuibeo Jan 03 '13 at 01:36

2 Answers2

3

getRGB565(...) will solve your problem. You can also try getARGB(...). And It is good practice to read the API documentation to get more information regarding any API method. So, read the documentation :).

Rupak
  • 3,674
  • 15
  • 23
0

Solution is here. Thanks to Arhimed.

Community
  • 1
  • 1
Jj Tuibeo
  • 773
  • 4
  • 18
  • [Are answers that just contain links elsewhere really “good answers”?](http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers) – Michael Donohue Jan 08 '13 at 06:56