Hello NG,
as you can see in the topic I want to encode the image of a texture with
Base64. Any idea how I can realize it? I'm asking because the
Base64-class I found on sourceforge needs a serializable-Object to
encode it - or an array of byte. But Texture is not serializable -
BufferedImage neither. And how can I get an Array of byte of the image?
I appreciate any answer.
greets
Gilbert
Oliver Wong - 20 Mar 2006 23:01 GMT
> Hello NG,
> as you can see in the topic I want to encode the image of a texture with
[quoted text clipped - 3 lines]
> BufferedImage neither. And how can I get an Array of byte of the image?
> I appreciate any answer.
Define an image file format (e.g. just encode each pixel as 4 bytes of
red, green, blue and alpha values). Convert your texture to that format,
then enocode your bytes with Base64.
- Oliver