I have a PNG file. I have decompressed the IDAT chunk and read it as a 16-bit color (16-bit per pixel) and saved them in a 1-dimensional array. The PNG file is 126x128 (wxh). But the pixel count that I have (array length) is 16,192. Therefore:
16192 <-- pixel I got
126x128=16128 <-- pixel using width and height
-----
64 <-- difference
What is this 64 pixel excess?
Edit
Thank you for your replies (comments and answers), especially @leonbloy.
The value 16,192 (pixel I got) is actually 34,384 bytes of data, I already divide it with the BytesPerPixel
.