Jump to content

Wikipedia:Reference desk/Archives/Computing/2016 October 23

From Wikipedia, the free encyclopedia
Computing desk
< October 22 << Sep | October | Nov >> October 24 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 23

[edit]

Monster Soup JPG displaying weirdly in Firefox on Linux

[edit]

I'm using Firefox 49.0 in a Fedora 23 Linux machine. Someone on the Humanities Desk recently posted a thumbnail link to File:Monster Soup commonly called Thames Water. Wellcome V0011218.jpg. When I view this image in Firefox, it displays with a weird color-substitution. This applies to the thumbnail or to any of the size versions of the original. I saved a copy of the file, used ImageMagick to convert it to a different size, and opened that version with Firefox, and it displayed the same way. Yet if I open the same file with xv or LibreOffice, it looks normal.

Since I'm not (and will not be) a registered Wikipedia user, I can't upload a screenshot to show you how the image shows for me. But the majority of it turns into colors close to cyan (0,255,255); some parts turn into pale magenta colors such as (255,167,255); some is white (255,255,255). In some cases colors that look similar in the true image turn into different colors in the substituted one, so it's not a simple mathematical transformation. Exploring different parts of the image using xv, I see that the Red element of the color varies all the way from 0 to 255, the Green value never seems to go below about 120, and the Blue value of is 255 everywhere.

I don't know how to analyze the structure of JPEG files. Can anyone tell if there's something unusual or nonstandard about this file that could cause such an effect? I view images in Firefox all the time and I don't remember encountering an effect like this; certainly not commonly. --69.159.61.230 (talk) 04:39, 23 October 2016 (UTC)[reply]

Could you upload a pic to some other location and post a link? Rojomoke (talk) 06:03, 23 October 2016 (UTC)[reply]
I wrote on the topic of Firefox's rendering engine during a discussion in July 2016, and here are my remarks, verbatim:
The reason this is not as simple as it seems at first glance is that the Firefox architecture is very complex. Is the symptom you see a bug (or feature) in Firefox? Is it in the Gecko layout engine? Is it in one of the Gecko compositing layers or software libraries (whose sparse and antique documentation leaves much to be desired)? Is the limitation in a platform-specific image rendering library that is dynamically linked (and therefore not strictly part of Firefox)? Modern software is really complicated and it is very plausible that underlying bug is not actually (solely) due to the (input image file). Only a skilled software engineer who is deeply familiar with Firefox and its rendering engine can tell for sure.
So if you don't know all these details, and don't have the expertise to find out by yourself, then before jumping to any conclusions, you should file a well-written bug report at the Mozilla bug reporting website. It will help if you provide as much detail as possible. What operating system? Which file - and can you upload it to your bug report? What errors are logged in Firefox Console?
Tragically, a majority of the "how-to-write-good-bug-reports-for-Firefox" documentation has been literally moved to the landfill at Mozilla. If I may inject a bit of nihilistic cynicism about your prospects for getting a fix, this server-name is a metaphorical statement from the organizers at Mozilla: there are no more real developers who still volunteer their time to improve Mozilla's products ... and your bug report will go right over to the landfill server, where it will be counted and never fixed. Perhaps it is time to choose a new browser?
Those remarks apply equally-well to this situation. The fact that your image renders correctly when you use other software seems to imply that your file is not corrupted - but some subtle error is occurring when Firefox tries to put those pixels on screen. This process of drawing pixels on screen - especially as Firefox has implemented it - is so immensely complicated, ordinary users do not generally have the skills or resources to diagnose it when it breaks.
Bluntly, your options are: live with the problem, file a bug report, or switch to a new browser.
Nimur (talk) 15:05, 23 October 2016 (UTC)[reply]
I might also suggest that the user's symptoms sound like color management gone awry. Monster soup... is a JFIF file containing JPEG image data, plus an embedded color profile tagged for the esoteric "TIFF RGB" color space. Here's an informational page from the International Color Consortium on what this means, with some beautiful screen-captures of what happens when it breaks. I will cynically point out that anybody who thinks digital color management is a good idea probably has not seen very many color-managed digital images. Many graphic artists often seem to think color management is the answer to their creative requirements. As a graphics- and image-processing software professional, I respectfully disagree. When color management works correctly, ordinary users quantitatively and measurably can not tell that it's working. When it breaks, ... users see symptoms where the picture "displays with a weird color-substitution" and "the majority of it turns into colors close to cyan" ... and somewhere in the distance a software engineer cries. Nimur (talk) 15:28, 23 October 2016 (UTC) [reply]
Considering the above, would it be a good idea for someone skilled in the art to edit the picture to remove the offending profile? Presumably it doesn't offer any significant benefits for this sort of picture, and a vanilla JPEG should display correctly on any computer manufactured since about 1990... Tevildo (talk) 20:36, 23 October 2016 (UTC)[reply]
Sure, I can re-upload a variant of that image with no embedded color profile, or with sRGB embedded profile. This will reduce the chance of a bad user-experience. I'd like to have a chance to check it on a few major consumer operating systems and browsers to make sure I didn't make the situation worse, so I won't rush the change. Follow the image file's talk page for updates.
Nimur (talk) 00:27, 24 October 2016 (UTC)[reply]