• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to convert int[] to Base64 format?

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic