I have a BufferedImage with .png or .svg in it. let's say it is 128*128 (image.GetHeight() image.GetWidth()
) and I convert it to byte array like this:
byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
and my byte array contains 2048 bytes (pixel.length) ??
I suppose that its dimension must be 128*128 = 16384 (all pixels)
I ma trying to understand how the SVG and PNG stores to byte array. I have tried with 1 pixel picture(black pixel) - that works perfect byte array size is 1