Images too bright

Bug #1436595 reported by Misaki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eog (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Most images have their values shifted upwards when displayed in eog, and I don't think it is intentional. Reporting this as a bug is complicated because I am not sure if some programs, such as eog, change their display of an image based on screen settings for colorspace or gamma. I am not an expert on graphics, but something does seem to be wrong.

So at least for my computer, eog seems to stretch out the range just above a 0 value. A very dark area will have a clear contrast between the totally black pixels, with a value of zero, and the ones just above it. In one image I tested, eog did not display any pixels with a value in the range of 1 to 5, as in the histogram of a screenshot of eog's display of the image.

In comparison, a screenshot of Firefox's display of the same image had numerous pixels in the 1~5 range. The GIMP image editor displayed this image the same as Firefox, with the histogram showing that the pixels were being displayed without any adjustment.

Basically, if a lot of different programs display things differently and inconsistently, some of them have to be wrong, and it seems likely that eog is. Due to inconsistencies, I'm not actually sure what is the correct, or the best way to display images, which might be different from the correct way.

Programs used to test, convert, and display images:
imagemagick
ffmpeg (for conversion) and avplay (for display, since ffplay isn't provided on my distribution)
eog
Firefox
vlc
GIMP

I thought Firefox was displaying non-stripped pngs the same as eog does, but it's actually slightly different. While gray areas are about the same as eog, red areas are slightly darker in Firefox.

A description of how various programs display images:
vlc seems to be the same as avplay, and both are different from either Firefox or eog. Dark red is a bit more like brown or orange, while contrast for luminosity or luminance (?) seems to be higher; I am just noting that it is different. This is for a png image.

I thought eog was displaying all images the same way, until I encountered a png that worked differently. I thought eog was displaying this png without any adjustments, as it's slightly darker than how eog displays other pngs, but it's actually slightly darker with more intense colours than how other programs display the same image. But for all other images, eog seems to make them slightly brighter.

Firefox displays jpgs without any adjustment, but most pngs are slightly brighter. As described, this is slightly different than how eog makes images brighter. If an image is converted with -strip action in imagemagick, Firefox shows the png without adjustments. A png output from ffmpeg is also displayed without adjustments. It seems to be related to the 'png:sRGB : intent=<value>' property but that would be a Firefox bug. It's relevant because it seems to adjust the display of images in a way that's similar to eog, though still different. If a stripped png is converted again without applying the -strip action again, Firefox will display it as adjusted; that is, brighter. This is also part of the evidence that the adjustment in Firefox, and therefore in eog, is a bug.

GIMP displays images without an adjustment, so darker than eog for most images.

The 'display' utility from imagemagick displays images the same as GIMP, without any apparent adjustments.

So GIMP, display from imagemagick, and Firefox all display jpgs as slightly darker than eog, without mostly skipping over the range of values just above 0. GIMP and 'display' show most pngs as darker than eog, while Firefox displays some pngs as darker than eog while others are displayed similar but with slightly darker reds it seems.

I think all the images I've looked at had 'colorspace: sRGB' in their properties when I looked at them with 'identify' from imagemagick or exiftool., so if that's somehow related it doesn't seem like programs should display images differently. They probably all had 'gamma: 0.45' in 'identify' (though this shows up as gamma: 2.2 in exiftool I think), so I don't think that should affect image display either.

For the unusual png that eog displays differently, none of the ways I used to convert it caused the output to be displayed in eog the same as the original. These methods included 'convert' from imagemagick with and without the -strip action; convert with jpg output; ffmpeg with png output; and GIMP exporting as png with background color and gamma tested (so four GIMP outputs total). The reason for testing background color was that 'png:bKGD' is part of the output from 'identify' when the -strip action isn't used with 'convert', and non-stripped pngs are treated differently in Firefox so they could potentially also be treated differently in eog, but as it turned out they weren't treated differently in eog.

In 'identify's output, the original png does have very slightly different numbers under Chromaticity, with five of eight numbers different by 0.0001. I don't know if that's supposed to affect display of the image at all. Under the 'Properties' subsection, either the stripped or the nonstripped version are similar to the original image. The output of 'identify' for the 'png:sRGB intent=<value>' property changes each time 'identify' is run on the same file, but both the original and the stripped version (which is displayed normally in Firefox, unlike non-stripped) have a value of around 'intent=32500±300'. For the stripped png, 'intent=0' but the other values under the Properties subsection are the same as the original other than adding a 'png:bKGD' field which the stripped version doesn't do.

In exiftool, the non-stripped png from 'convert' has the fields 'Gamma : 2.2' and 'SRGB Rendering : Perceptual', but neither the original nor the stripped version have these fields. It's possible that somehow, if some fields exist eog assumes certain values for other fields, but the reason this particular png is displayed differently in eog than other pngs is a mystery.

As a note, comparing the way different programs display images is easier using the zoom function in Compiz, as well as the window transparency function to line up images.

Most images being displayed lighter in eog than in many other programs might not be a bug; I am filing this bug report because it appears to be one. Maybe I should have tried asking under Questions but I doubt anyone except the package maintainers could provide a correct answer, due to inconsistency between different programs.

I am using Ubuntu 14.10, with eog (GNOME image viewer) version 3.12.2.

Revision history for this message
Misaki (myjunkmail311006) wrote :

Some examples of how eog displays colours compared to imagemagick's display. These files were generated as follows, using ffmpeg:
 ffmpeg -filter_complex color=black:256x256,geq=X:240:128 -hide_banner -frames 1 geq.png
 ffmpeg -filter_complex color=black:256x256,geq=X:240:128 -hide_banner -frames 1 geq.jpg
 ffmpeg -filter_complex color=black:256x256,geq=X:200:128 -hide_banner -frames 1 geq-200.png
 ffmpeg -filter_complex color=black:256x256,geq=X:200:128 -hide_banner -frames 1 geq-200.jpg
 ffmpeg -filter_complex color=black:256x256,geq=X:128:128 -hide_banner -frames 1 geq-128.png

convert geq-200.png -quality 100 geq-200.png.jpg
convert geq-200.png geq-200-convert.png

So these are images with a y (or is it y'?) value that ranges from 0 to 255, while the u value is at the mpeg range maximum for u of 240. The jpg and png images are different because the jpg images clip the y range when expanding it from 16~235 to 0~255, while the png images when converted to rgb allow the y values outside the normal range to affect the output colour. So the jpg output from convert is visually identical to the png it comes from, but on the edges u and v both have a gradient to produce those colours.

Then I took a screenshot of how eog displays geq-200.png, as well as a screenshot of how imagemagick (display) displays png, and combined them in GIMP. The jpgs are displayed roughly the same in both programs, other than the differences due to clipping when expanding to jpeg range.

Firefox displays the images output from ffmpeg the same way as imagemagick, but displays the png output from imagemagick's convert almost the same as eog does. This similarity is much higher than for the images I tested for the original bug report. I took a screenshot of Firefox's display of geq-200-convert.png, cropped it and placed it on top of a screenshot of eog's output of geq-200.png (which is displayed exactly the same as geq-200-convert.png by eog), used the difference filter and flattened the image. ("flattening an image" might be used incorrectly here, but it's what the option is called.)

Then I used the threshold operation, from 1 to 255, so the vertical lines are where they differed. All but one of the lines disappear at threshold 2, the last disappears at threshold 5.

Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :
Revision history for this message
Misaki (myjunkmail311006) wrote :

While it isn't completely clear what the correct way to display images is, if eog is in fact currently displaying them correctly it would help to have an option to display them 'literally'. It doesn't seem like there is any way to do this. Exact comparisons are helpful to diagnose problems in other programs, or even for things like just understanding whether the rgb to yuv conversion is linear or follows some other equation, for someone who has encountered that situation without much knowledge about it.

For example, suppose you want to compare whether Youtube's video player is displaying a video the same as your local player does. You could press "F" every time you switch to Youtube to cause it to go fullscreen, then switch to the other player while staring at the same spot. Or you could screenshot Youtube's display and compare to the screenshot. But if eog is the default image viewer and it displays it differently from how it originally appeared, you might make the wrong diagnosis and waste time.

Revision history for this message
Misaki (myjunkmail311006) wrote :

This is due to color management. I think I filed a bug report on the Gnome bugtracker with slightly different information, but regarding brightness jumping from 0 to ~5 out of 255:

According to http://www.lagom.nl/lcd-test/black.php, with 6-bit dithering, usually "the darkest four shades (0, 1, 2, 3) all are displayed as black regardless of the monitor settings." Most models of my laptop didn't have LED backlights, and maybe the default color profile for my laptop model was intended for those non-LED backlights. Although my screen is 6-bit, shades 1~3 are still discernible. In any case, turning off color management fixed the problem for eog, and presumably for Firefox as well after a restart.

Changed in eog (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.