Answer the question
In order to leave comments, you need to log in
How to reduce the weight of the generated image in PIL?
I am writing a simple PIL (pillow) script for utilitarian needs.
The essence of the script: a picture with a resolution of 540 * 960 is created. The picture is three-colored - one color is the background, the second is numbers and lines, the third color is other numbers. The second rows of numbers are arbitrary (see picture).
Picture for display on the screen of a smartphone (android, iPhone)
Picture example:
Question - how to optimize the image so that the picture weighs less?
Which format to choose?
What can be written in the script - the type of compression, or what parameters to set when saving and how?
My example weighs 88.1 kb, which seems to be a lot for such a simple three-color picture. However, the picture should open on android/iOs without dancing with tambourines (that's why I didn't consider vector pictures).
Answer the question
In order to leave comments, you need to log in
in a regular gif 34 kilobytes without optimization for a picture in the form of three colors
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question