Show HN: Simple image resizing/optimization service
scaley.io
scaley.io
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 it, but I could make libvips-tools' vipsthumbnail program work correctly:
$ vipsthumbnail --linear -f tn_%s.png -s 256x128 gamma-1.0-or-2.2.png
Note the "--linear" option, without it produces the same wrong image.I didn't include it in the website, admittedly because I didn't fully understand it, and I wanted to keep the service as simple as possible.
Would it make sense for this to be the default?
[1] https://i.scaley.io/png-gamma-256x128/i.imgur.com/X9vKa2s.pn...
The ImageWorsener's website as an excellent reading material on image resizing and other transformations. ImageWorsener is a "correctness first" image resizing software.
It is possible to optimize the linearization steps so that they don't detract too much from the performance, especially if you're using one of the better (i.e. slower) interpolation methods.
"The Importance of Being Linear"[1] which just came up on HN a few days ago, discusses some issues with non-linearity, specifically in the context of 3D rendering.
[1] - http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html
[1] http://blog.johnnovak.net/2016/09/21/what-every-coder-should...
The colour experts have a variety of ways to do much better, almost any of them will give you much better results. Pick one and be done. Your undocumented -gamma- option is fine.
If you want the best option you should be prepared to invest a lot of time and attention, in return for which you'll get a result that's perhaps a little better than your -gamma- and a lot better than plain RGB averaging.
At the same time shaved off 46% of the size (from 4.02 KB to 2.16 KB)
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.
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.
You instead should offer standard 99.9% (44 mins a month) or 99.99% (4 min 30 sec) with standard SLA language.
A disclosure: I'm the co-founder of Uploadcare.
I always try to price fee tiers so that one paid customer pays for about 100 or more free users and aim for at least 5% conversion of free to paid. It's not a hard-fast rule but a good starting point. If I can't hit that (even after crippling the free tier) I just drop the free tier altogether and make it a free trial instead.
SECTION 10: LIMITATION ON NON-HTML CACHING
You acknowledge that Cloudflare’s Service is offered as a platform to cache and serve web pages and websites and is not offered for other purposes, such as remote storage. Accordingly, you understand and agree to use the Service solely for the purpose of hosting and serving web pages as viewed through a web browser or other application and the Hypertext Markup Language (HTML) protocol or other equivalent technology. Cloudflare’s Service is also a shared web caching service, which means a number of customers’ websites are cached from the same server. To ensure that Cloudflare’s Service is reliable and available for the greatest number of users, a customer’s usage cannot adversely affect the performance of other customers’ sites. Additionally, the purpose of Cloudflare’s Service is to proxy web content, not store data. Using an account primarily as an online storage space, including the storage or caching of a disproportionate percentage of pictures, movies, audio files, or other non-HTML content, is prohibited. You further agree that if, at Cloudflare’s sole discretion, you are deemed to have violated this section, or if Cloudflare, in its sole discretion, deems it necessary due to excessive burden or potential adverse impact on Cloudflare’s systems, potential adverse impact on other users, server processing power, server memory, abuse controls, or other reasons, Cloudflare may suspend or terminate your account without notice to or liability to you.
You further agree that if [...] if Cloudflare, in its
sole discretion, deems it necessary due to [...]
other reasons, Cloudflare may suspend or terminate
your account without notice to or liability to you.
I gotta say, that statement isn't very helpful in letting people know what to avoid doing.A simple url DOS attack from my puny browser may cripple your entire server.
The backend for the processing service is nodejs and sharp[1], processed images are cached on CloudFlare. The processing servers are a custom instance type in an autoscaling group on Google Cloud.
Any feedback is greatly appreciated!
I have a lot of media-heavy side projects. I use Cloudinary for 1 and imgix for the rest.
It's really hard to compare you price-wise to imgix because you are charging based differently.
One thing I like about imgix is that I can give them access to an S3 bucket and perform transformations on master images that aren't public-read.
Like others who commented, I don't get the idea of image-resize-as-a-service, so I remember I laughed at my client when they asked me for this. For some reason I believe it's better for the world if we don't make people think it's ok to throw around gigantic images around the cables when it's completely unnecessary...
(But of course ever-changing externally hosted web services like these have their drawbacks.)
/:options/:image
over /:image/:options
? Seems the latter would be more user friendly.Please don't show a blank page when no javascript is available.
Maybe a message that you should enable javascript or better some basic information what your service does.
https://scontent.fbed1-2.fna.fbcdn.net/v/t31.0-8/11206479_82...
https://i.scaley.io/600-max-https/scontent.fbed1-2.fna.fbcdn...
Not everyone is obsessed with microservices.
But it also can't be a closed system with private keys and all that, because the hassle is too enormous -- the user will need a server to get the key for each image and so on.
I have the impression that all services of this kind suffer from the above dual-problem.
There are definitely other services out there which address the same thing, the closest one is probably https://rsz.io/ which even includes some more processing features, but it doesn't have the CDN and I couldn't find any info about uptime.
If you want to host it yourself...
Downtime of an hour equals a dollar or something
But those aren't URLs. Do you document how images are retrieved, http or https?
Might be my English (not a native speaker) but your message isn't clear.
Have any signups yet?