0
How to extract each pixel of an camera image in text format (in low language)?
I want to extract each pixel of an image from a image format such .PNG or any format and to keep it in text format as .txt. I mean I want to know what colour has each pixel in terms of colour code (it may be in binary format).
4 Answers
+ 18
(default is PNG)
+ 15
On js you can draw image on canvas and export with canv.toDataURL. This will return the image in base64 format which can be stored as string.
+ 2
+ ValentinHacker's answer, the default output format is (I believe) JPG -- PNG-encoded base64 should be smaller.
+ 2
Why indeed it is; I could have just tested since I have an export.
data:image/png;base64,[...data....]
Thanks!