What ordering does the GNOME image viewer assume? RGB or BGR?

I have pictures which are saved as RGB but the red looks blue, so I assume that the image viewer assumes the images to be BGR ordered. Is that correct?

Hello, it’s hard to say without more info. Which format are the pictures saved in (such as PNG, TIF, etc)? Which version of GNOME are you using? Which version of Image Viewer are you using? Are there any other image viewers you have installed that do support these images?

The format doesn’t matter, I observe the same problem in png and jpg images. I use version 42.0 of the image viewer, not sure which gnome version. GIMP gives me the same effect. But I think my problem lies in opencv and the fact that the conversion method BGR2RGB just swaps the channels.

PNG and JPG do not have native support for swapping the byte order, the only common format I know that can do that is BMP. But it seems unlikely OpenCV knows how to make it do that. AFAIK it is also possible to make an ICC profile that swaps the red and blue, but for best compatibility probably the easiest thing to do is to use the correct conversion method when outputting the file.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.