I have a image whose base64 is roughly 10K characters long. I have to put this image in a qr code, due to size limitations of QR code, I cant put the entire base64 in it. Can I somehow reduce/encode/compress the image to around 1K characters. I need to put the image in QR code, not as a link or anything else.
Any suggestions on what compression/encoding could be used here.
You can use ImageMagick at the command line to try and reduce the size of your image but it isn't going to be pretty.
convert input.jpg -strip -define jpeg:extent=1000 result.jpg
The -define jpeg:extent=1000
means you want the resulting image to be under 1,000 bytes regardless of how low the quality is. Good luck!
Here is Theresa May at under 1,000 bytes for example: