I have a PNG image and got its Base64 PNG string representation. It’s still quite large and i’d like to know if it can be significantly further compressed. Is that even possible?
Background
I am using Selenium 2 (Java) to create a screenshot of the current web page, convert it as base64 string and send that string to the JavaScript executor to recreate that image and do some image processing. But if that string size is too large, the server returns an Exception.
The simple answer: No – not without loosing the “printable string” nature
Usually PNG already uses sophisticated compression like it is used in ZIP files. Therefore compressing it before applying the base64 encoding will give you only very limited size reduction.
Applying the compression after the base64 encoding will make it to binary data again – in this case you could just skip the base64 encoding step.