Hexadecimal-> file (jpg)
Good morning. I want to convert the HEX value into a jpg file,
I want to put a jpg file in the img variable and display it on the screen.
Does anyone know how to convert?
FILE LINK : https://drive.google.com/drive/folders/1rhQzGZZEryEzlxKUwgKbeSdSVcbO1lH5
- jpg file
- jpg hex file
we had the question already the other way,
have a picture and store its pix / color info in HEX text to a file.
so if you have a HEX text file and want read that in processing
and construct a picture from it there is the need to know
what the values ( and the file structure ) mean?
the file has a structure with lines and ,
possibly that means nothing and can be ignored while reading?
-b- 6 char could be 3 byte numbers lets say of R G B value for one pix?
as ASCII text to bytes   
pix = color( 255,216,255);
-c- but to make a picture from that would still need a additional information
what is the width of the picture in pix? like where the next line starts.
-d- you posted a picture with the dim. 320 * 240
-d1- is that the original you used to make the HEX text file from? and how you did that ?
-d2- is that the dim info you want use to reconstruct it?
-e- you see, if that is a coding / decoding question
that even without any encryption used,
it is already difficult without add information.
Thank you for your interest.
Answer 1: Picture width: 320x240
Answer 2: I received data from mcu through a serial camera.
Answer 3: I know it is in jpg codec.
processing can not decode jpg codec easily,
so do the same as the
- ignoring ‘,’ and lines
- take 2 char make one byte
and try to save it to a jpg file in binary.
and reload that as a image
thank you. Thanks to you.
thank you very much.