GIMP Image Encoding non-linear vs. Linear-light

When using GIMP with the default value for Image Encoding (i.e. Linear-light) I am getting some weird effects. E.g. thumbnails of exported PNGs appear quite dark in other software (e.g. DigiKam).
When setting Image Enconding to Non-linear everything is OK.
Unfortunately, I have found no way to define Non-linear as the default value.
Has anybody a tip?
I’m using GIMP 2.99.18

Hi Gerd,
I am confused by your question and since you have no answers here yet others may also be confused. Did you mean encoding instead of enconding? At what stage are you doing this? Could you provide a screen shot? My exports from GIMP work fine for me.

Hello Terry
Thank you for your reply and sorry for the confusion. The spelling error in the text is corrected (of course it is encoding).
I have attached a screenshot.
To my knowledge the encoding is applied to the image when it is loaded into GIMP.


In my experience, the main difference is about the handling of transparency. If you set the layer to Legacy mode, what you see in Gimp is a lot closer to what your exported file will look like in other image viewers.

I reported this as a bug some time ago: Inconsistencies in transparency rendering (#9336) · Issues · GNOME / GIMP · GitLab

So is this is a RAW file being brought into GIMP and therefore it is a 32bit floating point? My version might be a little different to yours but I would not have linear light selected. I feel that could be your issue, but I defer to more knowledgeable people if they respond.



You can set Non-Linear as default value in Preferences.


Thank you, that’s precisely what I have been looking for.


1 Like

Sorry, the issue still remains.
When I export images from GIMP in PNG format, I get strange results.
The screenshot below shows two images in DigiKam Lighttable.
Note that the thumbnail of one image is darker. The only difference is a switch from “linear light” ( thumbnail too dark) to “non-linear” (correct brightness of thumbnail) before exporting the images from GIMP.
Changing the setting for each image manually is annoying. I’m looking for a way to set “non linear” as the default when importing images or an other way to solve the issue.

The solution provided by Yasuo Onishi only works when creating a new (i.e blank) image.

GIMP cannot read raw files directly. So how did you import these photo files into GIMP? If you process these photos with Raw Processor first, it’s better to export these photo files in non-linear format and then read them into GIMP, I think.

Thank you. I am aware of it.
Since almost 10 years I have a standardized workflow.
Card Reader CR3 → DigiKam CR3 → Darktable (raw processing) and export PNG → DigiKam → GIMP (retouching and printing) png and jpg.
It worked fine until recently.
Now the PNG export from GIMP behaves strangely.

There are two possibilities.

  1. The files exported by darktable have become linear png files.

  2. GIMP 2.99 now automatically converts nonlinear files to linear files.
    However, in my environment, I could not confirm a phenomenon like (2).

I can check it if you can upload the file exported with darktable.

And also I would like to recommend you to confirm following settings.

  1. darktable’s file exporting settings.

Especially “profile”.

  1. GIMP’s Color Management settings.

The “image settings” profile depends on the “output color profile” module settings, so the actual profile needs to be confirmed there.

I assume that the settings in Darktable are not the issue.
The thumbnails below show on the right a PNG exported with Darktable
and on the left the same image exported with GIMP (inside GIMP I just copied the layer).
In GIMP I have changed the colour management settings to the proposed values.

The images look OK. Only the thumbnails seem to be impacted.

I apologize for causing your misunderstanding. My capture image of darktable setting is not recommended value. Please set profile parameter in exporting setting to “sRGB (web-safe)”,
and also set output color profile module in darkroom to “sRGB (web-safe)”.

In your capture image, timestamp of darker thumbnail (left) is earlier than lighter (right). Therefor I suppose left file was exported by darktable and right was exported by GIMP. If my supposing is correct, the problem is not of GIMP but darktable.

And it may be partly of digiKam problem, because digiKam does not properly apply color management to thumbnail images.

Thank you for your efforts and for your reply.
I have set Darktable export and output colour profile to sRGB.
Unfortunately, the results are the same.
Both images exported via Darktable and subsequently the left one processes via GIMP.
The darkening effect only is visible in the thumbnail.
When I change the encoding setting in GIMP from linear light to non-linear everything is OK.

In my circumstance, I can’t confirm the phenomenon that GIMP 2.99.18 reads all files automatically as linear in default. My GIMP reads even the files exported in linear format as non-linear in default (“Convert to built-in sRGB”).

If it is GIMP problem, I suspect your GIMP configuration files may be broken. Therefor I would like to recommend once delete all GIMP configuration files and re-install GIMP.

Hello Yasuoさん

Thank you very much. Deleting the GIMP config files and reinstalling GIMP resolved the issue.



1 Like