Skip to content

Conversation

@weavejul
Copy link

Image Color Inversion

Summary

I've found that switching between normal and inverted colors making it easier for me to trace. Sooo....
This code introduces an Invert Colors checkbox under the View tab. It allows users to toggle between normal and inverted colors.

Changes Introduced

  • Added a checkbox under the View tab to toggle color inversion.
  • Inverts the RGB values of the displayed image.
  • Trace colors remain unaffected.
  • The setting resets to “False” on startup.

Adds a checkbox under the "View" tab that inverts the RGB values of the displayed image (QImage.InvertRGB).

Does not affect trace colors.

Resets to "False" at startup.
@weavejul
Copy link
Author

It might fit better in the Series tab, but that should be a relatively simple change (moving ("invertcolors_act", "Invert Colors", "checkbox", self.field.toggleInvertColors), from def return_view_menu to def return_series_menu).

@quasiTriestino
Copy link
Collaborator

This a great suggestion. I'm not super keen on the field (the background) becoming white when you invert (which is evident when you're viewing a section at low mag/zoomed out). Would you please alter your pull request to maintain a black field, so that only the colors of the image are inverted? Also, in keeping in line with the FieldWidgetBase class structure, we should define a instance attr of self.invert_colors or something similar here and use that. (Keeping it in the view menu for now is fine.) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants