375 points · by natthub · 9y ago · 117 comments
1. Scaling down in linear colorspace is essential. One example is [1], where [2] is sRGB and [3] is linear. There are some canary images too [4].
2. Plain bicubic filtering is not good anymore. EWA (Elliptical Weighted Averaging) filtering by Nicolas Robidoux produces much better results [5].
3. Using default JPEG quantization tables at quality 75 is not good anymore. That's what people referring as horrible compression. MozJPEG [6] is a much better alternative. With edge detection and quality assessment, it's even better.
4. You have to realize that 8-bit wide-gamut photographs will show noticeable banding on sRGB devices. Here's my attempt [7] to reveal the issue using sRGB as a wider gamut colorspace.
[1] https://unsplash.com/photos/UyUvM0xcqMA
[2] https://cloud.githubusercontent.com/assets/107935/13997633/a...
[3] https://cloud.githubusercontent.com/assets/107935/13997660/b...
[4] https://cloud.githubusercontent.com/assets/72159/11488537/3d...
[5] http://www.imagemagick.org/Usage/filter/nicolas/
This is pretty astonishing to me. I always thought applying smartly designed color filters to pictures was basically Instagram's entire value proposition. In particular, I would have thought that designing filters to emulate the look and feel of various old films would have taken some fairly involved imaging knowledge. How did Instagram get so far without color experts?
Working in a different color space than standard requires a little bit of familiarity and finesse that modifying 8-bit jpegs for consumption on the internet did not require.
Many photographers and printers are familiar with this dilemma in a variety of circumstances, where the cameras create images in a different color space and higher bit depth that can't be perceived at all with any technology or the human eye.
As an analogy, think of the value music theory (i. e. https://en.wikipedia.org/wiki/Scale_(music)#Harmonic_content) for composition.
[0] http://blog.johnnovak.net/2016/09/21/what-every-coder-should...
(I'm a maintainer of pillow)
Vertical Image: 1080px in width by 1350px in height
Horizontal Image: 1080px in width by 566px in height
And you probably overestimate how large Instagram, the app, is.
Edited to add: and some other ones are doing something even less fancy, which is just to ignore the color profile entirely and just assume sRGB and display it incorrectly, taking for example what would have been the maximum red point for Display-P3 and making it the maximum red point in sRGB.
(Not an android user, I just want to figure out how a company of your size prioritises between bugs and features.)
And regarding android compression issues, although resources are always finite, I imagine in this case the android team is fairly separate, so they may very well be working on that compression issue while iOS is pushing forward into new terrain.
Not of instagram user. Not of app users.
By the way, anyone who can display it (all my nice monitors aren't with me at the moment) can you see it on this imgur link? http://i.imgur.com/qCna54M.png
This comment explains it (at least for Webkit's test image, which is probably similar to Instagram's).
> No, it is a bad test. It is an image with an ICC tag that indicates it uses a color space larger than sRGB. The image data has the logo using color that should be outside the sRGB color space, but it still uses 8 or 16 bits to store that data. Android doesn't have color management. Android basically assumes all images are sRGB, so you see the logo. iOS does have color management. iOS sees the ICC profile and interprets the image data so that if you do not have a display that could show you the different reds in the image, it doesn't display them. So we have everyone in this thread on Android thinking they have a wide color display. Most of their displays aren't even 100% sRGB. My Nexus 4 shows the logo. It is very much not a wide-color display.
But before that, could they not convert images to horribly encoded JPEGs? I get it, bandwidth and costs, but it's an image service that still drowns in its own... when it gets an image with strong reds and blues.
If you have some sample images where the current image pipeline is going wrong let me know and we can look into improving.
They are typically pushed by people who use the latest chrome, so they have an excuse not to care about other browsers.
Their preformance, and usability is almost invariably terrible.
(Indeed, I can see a faint Instagram logo on my iPhone7, but not my older rMBP.)
Here's the link from the article with the download flag removed:
Changing Chrome/OSX to report its User-Agent as iOS9 MobileSafari does not help get a different image from IMGUR.
http://cameratico.com/tools/web-browser-color-management-tes...
To make the change: System Preferences -> Displays -> Color
How do I get Chrome to do proper rendering?
That being said, the logo is visible in Chrome for (using a Dell display).
https://webkit.org/blog-files/color-gamut/
[1]: Compared Safari, Firefox and Chrome on a 2016 MacBook Pro w/ Touchbar running macOS 10.12.
Another things worth mentioning is that lots of professional photo & graphics people have been using the Adobe RGB color space for almost 20 years which is "wider" than sRGB.
Not trolling, I care an incredible amount about color spaces, and had expected support for something like the UHDTV Rec.2020 color space with D65 (cool/blue white), not an obscure Adobe standard with D50 (warm/yellow white). It's wider than Rec.2020 though, so if this is what you're talking about: awesome, please update your article so people can find out more about this color model and the rest of the world can catch up!
> The color space that Apple chose for its devices going forward is Display P3.