• Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing an Image

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an image stored as an int[] array.

I want to store this image in a record store.

Will I have to convert it to a byte array? How?

I don't see any convience methods in MIDP 2.0 to do this.

I was hoping for something like:

addRecord(int[] data, int offset, int length);

Thanks,

Drew
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should have used byte array at the first place, which saves you precious memory on the hand device.
 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heh. Not very helpful in my situation.

What if you wanted to use the getRGB() method of the Image class, do some image processing, and then store the image in a record store?

Drew
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!