|| at Apr 17, 2013 at 11:05 pm
My elementary rule is: JPEG for 'natural' images like photos; PNG for
'synthetic' images like icons / computer generated graphics etc.
These are the use-cases the formats where designed for.
PNG uses the DEFLATE compression algorithm, but the real key role plays the
[..] the filter predicts the value of each pixel based on the values of
previous neighboring pixels, and subtracts the predicted color of the pixel
from the actual value, as in DPCM <http://en.wikipedia.org/wiki/DPCM
image line filtered in this way is often more compressible than the raw
image line would be, especially if it is similar to the line above, since
the differences from prediction will generally be clustered around 0,
rather than spread over all possible image values.
This doesn't work well for 'natural' images, since these images are somehow
*dity*. The pixel values suffer from some sort of scattering, which makes
it impossible to calculate proper pixel value rows.
On Wednesday, April 17, 2013 10:37:11 AM UTC+2, kar wrote:
Sorry if this has been asked. When working with image, after encode a JPEG
into PNG, the resulting file is significantly larger (50kb became 400kb).
Does image package support compression or not?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/groups/opt_out.