I have an application that requires I convert a PCX graphic to binary. There is very little info on the internet on how to do this. I can accomplish this with canvas.toDataURL using JS but only for PNG and JPEG graphic files. This is not for a SQL database as I think you can do it there. Any help would be appreciated, even if it involves using an app to get me there.
I have no idea what you mean by your question, but I presume that if you can do whatever it is that you want with a JPEG file but can't do that with a PCX file, it would help if you could convert your PCX to a JPEG.
So I would suggest you use "convert" from ImageMagick (here)
convert image.pcx image.jpg
Here is a text file:
This is the first line
You can read me, con't you?
Yes, it's because I am text
Here is a binary file:
<FF><D8><FF><E0>^@^PJFIF^@^A^A^A^@^A^@^A^@^@<FF><DB>^@C^@^C^B^B^B^B^B^C^B^B^B^C^C^C^C^D
^L^R^S^R^P^S^O^P^P^P<FF><DB>^@C^A^C^C^C^D^C^D^H^D^D^H^P^K ^K^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P^P<FF><C0>^@^Q^H^A<90>^@<C8>^C^A"^@^B^Q^A^C^Q^A<FF><C4>^@^]^@^@^@^G^A^A^A^@^@^@^@^@^@^@^@^@^@^@^B^C
^D^E^F^G^H^A <FF><C4>^@8^P^@^A^C^C^C^B^E^B^D^F^C^@^B^C^@^@^A^B^C^Q^@^D!^E^R1^FA^G^S"Qaq<81>^T2<91><A1>^H^U#B<B1><D1>R<C1><E1>^V<F0>3br<FF><C4>^@^Z^A^@^B^C^A^A^@^@^@^@^@^@^@^@^@^@^@^B^C^A^D^E^@^F<FF><C4>^@/^Q^@^B^B^A^D^A^C^