I am thinking about embedding arbitrary integer array data into an image file.
I am curious to see what my data looks like 🙂
Here are the questions which come to mind:
- What are the permissible integer ranges for conversion? (My integers are between 0 and Integer.MAX_VALUE).
- How do I need to handle 0 to Integer.MAX_VALUE to 8-bit ARGB integer ranges?
- Which lossless image format (png?)
- Does such a library already exist?
- I need to decode the data too. 🙂
It’s rather simple, since when you deal with a BufferedImage in Java, each pixel is stored (or at least, accessed) as an int natively. The full range of values is available, if your image is ARGB (32-bits). Any lossless image format will do.