FileToCArray icon indicating copy to clipboard operation
FileToCArray copied to clipboard

Lost bytes

Open barrct opened this issue 2 years ago • 0 comments

50x50

If I take the basic 50x50 image that is attached here, both my C++ (Arduino) and an online tool are showing data corruption. Basically a vertical line | is being skewed to /.

download

This can be tested my uploading the attached 50x50 jpg to the online example https://notisrac.github.io/FileToCArray/ then taking the HEX output and test the conversion back to an image online here https://mischianti.org/images-to-byte-array-online-converter-cpp-arduino/.

Oddly, the example Google.ico in the readme seems to work perfectly.

I have tested both jpg and bmp and was thinking it was me for 2 days until I started to count bits and tested the github test against converters.

Expected output can be created here https://www.digole.com/tools/PicturetoC_Hex_converter.php

These are the expected and actual arrays.

expected.txt actual.txt

I'm happy to help out in any way that I can, this is a great tool to have JS get images into the correct format for e-Ink displays.

barrct avatar Dec 12 '23 02:12 barrct