• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert int[] to Base64 format?

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to create an enlarged photo image, my midlet:

1. Takes a photo using getSnapshot(), storing the photo data in a byte[].
2. Creates an image from that byte[].
3. Creates enlarged copy of that image.
4. Uses enlargedImage.getRGB() to populate an int[] with the new ARGB data

The new int[] needs to be sent to a web service in base64 format - does anyone know how I would do this as the base64 encoders I've come across so far only seem to accept a byte[] as an input?

Many thanks,
James
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I'm puzzled as to why you want the image in int[] format. Images are usually byte[], and in the case of RGB or CYMK, you just have successive bytes for each hue or property value.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic