FAQ
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • David Symonds at Apr 17, 2013 at 8:53 am

    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.

    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kar at Apr 17, 2013 at 8:57 am
    Thanks, i've switched to JPEG since for my use case, i'm archiving alot of
    pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:

    On Wed, Apr 17, 2013 at 6:37 PM, kar <akma...@gmail.com <javascript:>>
    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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Gerard at Apr 17, 2013 at 9:12 am
    Personally I always use jpeg for photographs and png for things like
    screenshots. I keep that in mind and it never fails ;-)


    Op woensdag 17 april 2013 10:57:00 UTC+2 schreef kar het volgende:
    Thanks, i've switched to JPEG since for my use case, i'm archiving alot of
    pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:
    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • David DENG at Apr 19, 2013 at 12:30 am
    If you process the image all by yourself, why not try webp file format? It
    is a novel format that is better than old jpeg.

    https://developers.google.com/speed/webp/

    David
    On Wednesday, April 17, 2013 4:57:00 PM UTC+8, kar wrote:

    Thanks, i've switched to JPEG since for my use case, i'm archiving alot of
    pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:
    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Julien Schmidt at Apr 19, 2013 at 6:19 pm
    Nothing speaks against trying, but the lack of browser support prevents a
    production use in most cases.
    On Friday, April 19, 2013 2:30:06 AM UTC+2, David DENG wrote:

    If you process the image all by yourself, why not try webp file format? It
    is a novel format that is better than old jpeg.

    https://developers.google.com/speed/webp/

    David
    On Wednesday, April 17, 2013 4:57:00 PM UTC+8, kar wrote:

    Thanks, i've switched to JPEG since for my use case, i'm archiving alot
    of pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:
    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • David DENG at Apr 20, 2013 at 1:32 am
    You are somehow right. In Chrome extension/app, and Android application,
    using webp is just OK.

    It's an lossy image with mask supported. That's sometime very useful.

    David
    On Saturday, April 20, 2013 2:19:36 AM UTC+8, Julien Schmidt wrote:

    Nothing speaks against trying, but the lack of browser support prevents a
    production use in most cases.
    On Friday, April 19, 2013 2:30:06 AM UTC+2, David DENG wrote:

    If you process the image all by yourself, why not try webp file format?
    It is a novel format that is better than old jpeg.

    https://developers.google.com/speed/webp/

    David
    On Wednesday, April 17, 2013 4:57:00 PM UTC+8, kar wrote:

    Thanks, i've switched to JPEG since for my use case, i'm archiving alot
    of pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:
    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Job van der Zwan at Apr 19, 2013 at 7:22 pm
    How has WebP has developed since the early days, anyway? I remembered that
    x264 guy giving an insightful rant about the quality of the encoder at the
    time[1]. The comments following it are also interesting - especially the
    quantization table discussion. Too bad most of the screenshots no longer
    work.

    [1] http://x264dev.multimedia.cx/archives/541
    On Friday, 19 April 2013 02:30:06 UTC+2, David DENG wrote:

    If you process the image all by yourself, why not try webp file format? It
    is a novel format that is better than old jpeg.

    https://developers.google.com/speed/webp/

    David
    On Wednesday, April 17, 2013 4:57:00 PM UTC+8, kar wrote:

    Thanks, i've switched to JPEG since for my use case, i'm archiving alot
    of pictures. I need to balance a quality and filesize for better image
    streaming.
    On Wednesday, April 17, 2013 4:53:30 PM UTC+8, David Symonds wrote:
    On Wed, Apr 17, 2013 at 6:37 PM, 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?
    It's perfectly normal for a PNG to be larger than a JPEG; the former
    uses lossless compression, while the latter uses lossy compression.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Julien Schmidt 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
    (pre-)filter:
    [..] 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>. An
    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.
    http://en.wikipedia.org/wiki/Portable_Network_Graphics#Filtering

    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 17, '13 at 8:37a
activeApr 20, '13 at 1:32a
posts9
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase