Live data from Hacker News

Show HN: Simple image resizing/optimization service

scaley.io

71–80 of 82 posts

Re: Show HN: Simple image resizing/optimization service

#71
post #18

My acid test for image scaling software: http://i.imgur.com/X9vKa2s.png https://i.scaley.io/png-256x128/i.imgur.com/X9vKa2s.png This means that you don't use a linear color space for blending colors. Sorry about the language, the image is not made by me [1]. [1] https://web.archive.org/web/20120904060524/http://www.4p8.co... edit: I see that your backend relies on libvips to do the resizing. I have no experience with…

Wow, TIL. I had never realized that luminosity doesn't scale linearly. Awesome post.

Re: Show HN: Simple image resizing/optimization service

#72
post #18

My acid test for image scaling software: http://i.imgur.com/X9vKa2s.png https://i.scaley.io/png-256x128/i.imgur.com/X9vKa2s.png This means that you don't use a linear color space for blending colors. Sorry about the language, the image is not made by me [1]. [1] https://web.archive.org/web/20120904060524/http://www.4p8.co... edit: I see that your backend relies on libvips to do the resizing. I have no experience with…

Can you elaborate on how colors should be blended? Is it about the choice of interpolation algorithm? nearest neighborhood vs linear vs cubic, etc I've written image processing code in the past, though color accuracy wasn't important to it, and I'm curious to understand this better. I also currently use ImageOptim and would be curious to know if it handles this.

Disclaimer: I'm not an expert in this field.

I define "color" as a visual perception of a spacially homogenous electromagnetic spectra. Notation: c=p(s), meaning color is a perception of a given spectra. It turns out, that these percieved colors form a three dimensional vector space, this vector space is the representation of the infinite dimension vector space of electromagnetic spectras (c_i=p(s_i), p(a * c)=a * p(c), p(c1+c2)=p(c1)+p(c2) ).

We can parametrize this vector space with three numbers. If these numbers are coefficients of a linear system in these space, then we call this parametrization a "linear colorspace". Then physical blending of different spectra results in the same blending in coefficients.

Often we don't use this kind of parametrization (most often sRGB on the web), because perceptual distance is not linear in a linear colorspace, so we can get away with 8 bits per color channel to not introduce obvious banding in the darker regions.

Blending problems occur if someone doesn't know if the three numbers representing a color accually is a member of an actual vector space or not. Nobody would attemt to use the same algorithm in HSV tö blend.

Re: Show HN: Simple image resizing/optimization service

#73
post #27

Related: https://transloadit.com/

Transloadit is great. I'm using it right now with an open-source video project ( https://github.com/xiaofei-mo/mysteriousobjectsatnoon ). The encoding process is just ffmpeg under the hood, but not having to write all of the glue code to get it running with AWS has saved me a ton of time.

Thanks! Transloadit founder here - just wanted to say if there's anything you feel we could do better we'd love to hear that too :+1:

Re: Show HN: Simple image resizing/optimization service

#74

Awesome work! I have a suggestion/question. Why did you chose the pattern /:options/:image over /:image/:options ? Seems the latter would be more user friendly.

If the image url is in front there isn't exactly a sure fire way to tell where that url ends and where the options should begin. Of course there are work arounds, but the way it is now it seems that it would cover every case.

Good point. Didn't think of that.

Re: Show HN: Simple image resizing/optimization service

#75
post #71
post #18

My acid test for image scaling software: http://i.imgur.com/X9vKa2s.png https://i.scaley.io/png-256x128/i.imgur.com/X9vKa2s.png This means that you don't use a linear color space for blending colors. Sorry about the language, the image is not made by me [1]. [1] https://web.archive.org/web/20120904060524/http://www.4p8.co... edit: I see that your backend relies on libvips to do the resizing. I have no experience with…

Wow, TIL. I had never realized that luminosity doesn't scale linearly. Awesome post.

Unfortunately we have evolved for wildlife survival, not mathematical simplicity ;) We're very nonlinear in the hearing department too!

Re: Show HN: Simple image resizing/optimization service

#77
post #39
post #31

Earlier quoted context omitted.

Nice! I think it should be the default. Some software might treats as a compromise between correctness and cost (doing the rescaling in linear space is usually more costly). In my view it should be correctness first. The ImageWorsener's website as an excellent reading material on image resizing and other transformations. ImageWorsener is a "correctness first" image resizing software. http://entropymine.com/imageworse…

"Correctness" is not very useful in image processing, it's all about perception and performance.

This page[1] documents some effects of gamma-incorrect resizing. Specifically, check out Figure 12.

[1] http://blog.johnnovak.net/2016/09/21/what-every-coder-should...

Re: Show HN: Simple image resizing/optimization service

#78

I'd like to echo the sentiment that offering 100% uptime and 3x, 5x, 10x refunds is a dangerous decision and actually will not increase paid signups. I've been doing operations/DevOps for over a decade (in fact I just launched a consulting startup ( https://elasticbyte.net ) that helps companies manage their cloud infrastructure). 100% uptime is a red flag, ops professionals never guarantee 100%. You instead should o…

Theoretically, I could sign up then DoS the site myself for a nice payout.

Re: Show HN: Simple image resizing/optimization service

#80
My problem is usually making the cropping "smart". I need a content-aware cropping so that the resulting image looks good. It doesn't seem to come up too often as a known and requested feature in most of these services, I am wondering how come, this seems like a "must have" for me
Post reply on HN