Bug 224211 - Invert effect: don't invert images
Summary: Invert effect: don't invert images
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-25 19:58 UTC by Dotan Cohen
Modified: 2010-01-26 18:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dotan Cohen 2010-01-25 19:58:57 UTC
Version:            (using Devel)
Installed from:    Compiled sources

If there is a way to determine what screen elements are images (png, jpg, gif) then it would be great if the Invert effect could not invert those elements. I find the occasional invert to be very refreshing for the eyes, however images are useless inverted.

Thanks!
Comment 1 Christoph Feck 2010-01-25 20:47:16 UTC
There isn't.

What could be done is using some color profiles which effectively invert the picture (twice), so that it shows correctly. The application has to support such profiles, and only enable them on its images.

Additionally, I am not sure how far that should go. What about icons? The real question is, why the invert plugin has to be there in the first place, in other words, why switching color themes is not sufficient.

If all applications would follow the KDE color scheme, at least for basic Window/Base/Text colors, there should not be a need for the invert plugin, right?
Comment 2 lucas 2010-01-26 04:56:07 UTC
1) The results of implementing this are not worth the amount of effort required to do it, and
2) The invert effect is intended to invert everything; Inverting only text and backgrounds is the job of the colour scheme.
Comment 3 Dotan Cohen 2010-01-26 17:06:33 UTC
> Additionally, I am not sure how far that should
> go. What about icons?

No, icons should swap just like anything else.


> The real question is, why the invert plugin has to be
> there in the first place, in other words, why switching
> color themes is not sufficient.

Because switching colour themes does not change the appearance of PDF documents or webpages, which often have terrible-for-the-eyes black on white.


> If all applications would follow the KDE color scheme, at
> least for basic Window/Base/Text colors, there should not
> be a need for the invert plugin, right?

No, because users use documents as well as the desktop UI.


> The results of implementing this are not worth the amount of
> effort required to do it

Maybe not for you now, but just wait until your eyes go!


> The invert effect is intended to invert everything; Inverting
> only text and backgrounds is the job of the colour scheme.

And who's responsibility is it to recode the web in eye-friendly colours? Custom CSS will only get one so far, so slowly.

Might this be reopened as an accessibility issue?
Comment 4 Martin Flöser 2010-01-26 17:15:30 UTC
Let's take the example pdf - in many cases it's just a series of scanned pages. In such a situation the pdf viewer (lets call it Okular) does and can't know what is an image which should not be inverted and what is something else. For Okular the pdf is just an image. It won't work.

Your idea tries to fix a problem in the wrong layer. Even if Okular would know what are images and what not, it would be wrong to do the inversion in the window manager. That belongs inside Okular. Okular could just switch colors during rendering the page. It would be independent from the window manager, and doesn't need to pass the information to the window manager. The applications would have to be changed anyway to support this feature. If they have to be changed, it can be done properly by using invert in the application directly.
Comment 5 Dotan Cohen 2010-01-26 17:53:39 UTC
> Let's take the example pdf - in many cases it's just a
> series of scanned pages.

In those cases, the scanned pages are images and Okular knows that, verified by copying a PDF containing text and images, the image comes up in the pasted text as 




. Therefore, they should not be inverted.

But relegating this to a corner case, why discard a feature based on uncertainty about a corner case?
Comment 6 Martin Flöser 2010-01-26 18:15:35 UTC
(In reply to comment #5)
> But relegating this to a corner case, why discard a feature based on
> uncertainty about a corner case?
If I am able to construct a corner case in a few minutes, then there are more. What I described will work for many other things as well think of flash videos embedded on websites, images on images, etc. The corner case illustrates that it doesn't work in general.

But most important it's really not worth the effort. This is not a trivial issue as it requires to change the window manager, the NETWM specification and all applications. It's unlikely that one of the kwin developers will start working on it - sorry.

Such content aware inverting should be done in the specific applications. It's just not the task of a window manager. Just think of text embedded on an image. The application will be able to invert only the image or the text - kwin will never be able to do that as it only has access to the result pixel: image with text on top.
Comment 7 Dotan Cohen 2010-01-26 18:19:55 UTC
I understand the difficulties in those situations. I am now convinced that content inversion should be handled in each application separately. Thank you for bringing up the cases and explaining them clearly.