image2cpp icon indicating copy to clipboard operation
image2cpp copied to clipboard

Download as binary file

Open JakesCustomShop opened this issue 1 year ago • 2 comments

Downloading the .bin file and viewing with VS code HexEditor, the .bin does not match the values generated in hex on the GUI.

When "Remove '0x' and commas from output" is selected, the downloaded .bin file is empty.

Downloaded .bin file image

GUI output data: image

JakesCustomShop avatar Mar 16 '24 16:03 JakesCustomShop

It seems like when using RGB565 all 16bit integers are casted to 8bit which also explains why the downloaded file is only half the size of the generated c array.

1RandomDev avatar May 07 '25 14:05 1RandomDev

Can also confirm the file I downloaded was different to the bytes i got when copy-pasting.

I was able to copy the bytes into a file, and then run cat image.txt | tr -d '\n' | xxd -r -p > image.bin to fix this.

tyhdefu avatar May 20 '25 17:05 tyhdefu

You can fix this error in the file ./js/script.js in line 1045 replace const data = new Uint8Array(raw); to const data = new Uint16Array(raw);

VladimirRomanovskiy avatar Oct 28 '25 15:10 VladimirRomanovskiy