Live data from Hacker News

Show HN: High End Color Quantizer

github.com

31–40 of 43 posts

Re: Show HN: High End Color Quantizer

#31
post #6

What's the primary use case you had in mind here? In the example I see it generating a palette of 256 colors and then using them, but it doesn't seem to correspond to any modern use case. AFAIU one currently needs dithering either as part of print/display process (but then you have a fixed palette), or for compression, but I think this makes sense nowadays only with very low color count, like 16 max?

For just about any obsolete desktop computing solution there's almost always an embedded application somewhere doing the same thing today.

Colour quantisation is still one of the best lossy image compression formats for when you have almost no memory or CPU.

Re: Show HN: High End Color Quantizer

#32
post #6

What's the primary use case you had in mind here? In the example I see it generating a palette of 256 colors and then using them, but it doesn't seem to correspond to any modern use case. AFAIU one currently needs dithering either as part of print/display process (but then you have a fixed palette), or for compression, but I think this makes sense nowadays only with very low color count, like 16 max?

[deleted]

Re: Show HN: High End Color Quantizer

#33
post #29

Earlier quoted context omitted.

Also, dithering and color quantization are two vastly different operations on two different data types in two different domains that don't belong in the same topic at all. Still, color quantization is a really interesting rabbit hole to go down if you're new to graphics programming, or at least it was for me. It's a mixed blessing that almost nobody has to confront the problem anymore.

Really? Dithering is generally only useful with quantized colors, you can't dither something that's already quantized without knowledge of the original, and many/most people who want to do quantization also want to do dithering. The algorithms themselves might not be conceptually similar, but for practical purposes they seems very related.

[deleted]

Re: Show HN: High End Color Quantizer

#34
post #6

What's the primary use case you had in mind here? In the example I see it generating a palette of 256 colors and then using them, but it doesn't seem to correspond to any modern use case. AFAIU one currently needs dithering either as part of print/display process (but then you have a fixed palette), or for compression, but I think this makes sense nowadays only with very low color count, like 16 max?

I'm always interested in ways to increase the quality of GIF rendering. There are absolutely tons of places that still need GIF support, either because they don't allow video uploads, or because the videos don't auto-play. Gifski uses the png-quant library, and I wonder how this compares?

working with GIF is valid but it is incredibly sad how it's still the only widely supported silent autoplaying video...

(I guess APNG is supported in many browsers, but uploading one often results in deleterious resizing/recompressing operations that ruins the animation. Discord uses APNG and webp for stickers afaik)

Re: Show HN: High End Color Quantizer

#35

Earlier quoted context omitted.

I'm always interested in ways to increase the quality of GIF rendering. There are absolutely tons of places that still need GIF support, either because they don't allow video uploads, or because the videos don't auto-play. Gifski uses the png-quant library, and I wonder how this compares?

working with GIF is valid but it is incredibly sad how it's still the only widely supported silent autoplaying video... (I guess APNG is supported in many browsers, but uploading one often results in deleterious resizing/recompressing operations that ruins the animation. Discord uses APNG and webp for stickers afaik)

APNG and animated WEBP are blocked and/or unsupported practically everywhere I try. And I try a lot of places to test it. Reddit supports neither, yet allows GIFs. It's sad.

Re: Show HN: High End Color Quantizer

#36

The example image only shows the differences between parts of the image that are deemed as salient, but does not show the effects of the tradeoff on the non-salient parts nor does it show an entire quantized image. I'd say that showing full example results are the most important part of showcasing a "high end" color quantizer.

Yeah, good point. I'll definitely add an image showing the saliency map tradeoff. Regarding full examples, because some other projects seem to have cherry picked cases where they perform very well, I wanted to go for a "try it out yourself" approach, at least for now. Maybe in the future I'll add a proper showcase. Thanks for the feedback :)

take a look at my demo [1]. i'd love to see the same set of images quantized with your thing.

the quant frog [2] is interesting since it has an artificial single pixel line at the top with a ton of colors to trip quantizers up.

[1] https://github.com/leeoniya/RgbQuant.js/

[2] https://github.com/leeoniya/RgbQuant.js/blob/master/demo/img...

Re: Show HN: High End Color Quantizer

#39

Earlier quoted context omitted.

working with GIF is valid but it is incredibly sad how it's still the only widely supported silent autoplaying video... (I guess APNG is supported in many browsers, but uploading one often results in deleterious resizing/recompressing operations that ruins the animation. Discord uses APNG and webp for stickers afaik)

APNG and animated WEBP are blocked and/or unsupported practically everywhere I try. And I try a lot of places to test it. Reddit supports neither, yet allows GIFs. It's sad.

Agreed, very sad... Most tools/websites will cause APNG to silently degrade into a static image of only the first frame.

Re: Show HN: High End Color Quantizer

#40
post #6

What's the primary use case you had in mind here? In the example I see it generating a palette of 256 colors and then using them, but it doesn't seem to correspond to any modern use case. AFAIU one currently needs dithering either as part of print/display process (but then you have a fixed palette), or for compression, but I think this makes sense nowadays only with very low color count, like 16 max?

I'm always interested in ways to increase the quality of GIF rendering. There are absolutely tons of places that still need GIF support, either because they don't allow video uploads, or because the videos don't auto-play. Gifski uses the png-quant library, and I wonder how this compares?

GIF rendering is a big use case.

pngquant was a big comparison subject during development (it's a brilliant piece of work, and a mature tool that does a few things more than just quantizing). Take it with a grain of salt of course, but in terms of raw quantization performance, patolette had the edge, particularly when dealing with images with tricky color distributions. With that said, pngquant's dithering algorithm is way more sophisticated (and animation aware, I think). In fact, one thing where it really shines is that it spots with pretty good precision where adding noise would actually hurt instead of helping.

Another thing is that patolette can quantize to both high and lower color counts (the latter particularly with CIELuv), whereas pngquant is more well suited for high color counts.

Post reply on HN