Modify

Opened 5 years ago

Last modified 4 weeks ago

#13382 new enhancement

a rasterfilters color inversion/transformation filter seems very useful

Reported by: A_Pirard Owned by: Nipel-Crumple
Priority: normal Milestone:
Component: Plugin rasterfilters Version:
Keywords: Cc:

Description

There is an issue about poor visibility of white background layers over JOSM black background.
Obvious example is that a black line is invisible.
Wouldn't a solution be to make a "color inversion" rasterfilters filter?
And maybe, while we are at it and if it's easy, also specific colors transformations?

Attachments (4)

invert.PNG (91.3 KB) - added by Nipel-Crumple 5 years ago.
black.png (4.2 KB) - added by A_Pirard 5 years ago.
on black.png (75.3 KB) - added by A_Pirard 5 years ago.
on white.png (76.0 KB) - added by A_Pirard 5 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 in reply to:  description ; Changed 5 years ago by Nipel-Crumple

Replying to A_Pirard:

There is an issue about poor visibility of white background layers over JOSM black background.
Obvious example is that a black line is invisible.
Wouldn't a solution be to make a "color inversion" rasterfilters filter?
And maybe, while we are at it and if it's easy, also specific colors transformations?

Hello!
I will try to implement one.

comment:2 in reply to:  1 Changed 5 years ago by Nipel-Crumple

Added one filter which is called "Invert Color" - feel free to use it and leave your feedback here, please. If it is not enough, let's decide what do we want in details.
Thanks a lot!

Last edited 5 years ago by Nipel-Crumple (previous) (diff)

comment:3 Changed 5 years ago by A_Pirard

Thank you but I see no new plugin update in the distribution nor any new filter in the list.

comment:4 in reply to:  3 Changed 5 years ago by anonymous

Replying to A_Pirard:

Thank you but I see no new plugin update in the distribution nor any new filter in the list.

That is true, plugin has no update. But with regards to filters - here you can find one new: https://josm.openstreetmap.de/wiki/ImageFilters/InvertColorFilter

Changed 5 years ago by Nipel-Crumple

Attachment: invert.PNG added

comment:5 in reply to:  3 Changed 5 years ago by Nipel-Crumple

I'm sorry for unathorized reply.
Also it is available for downloading in Preferences -> Settings for the map projections and ... -> Image Filters tab -> Invert Color

comment:6 Changed 5 years ago by A_Pirard

I got Invert Color downloaded, but I'm afraid I see no change to the layer when it's added and selected (tick).

Screenshots
black.png: a black line in a transparent layer displayed over a blank JOSM screen (;-))
Following is layer BE 'SPW(allonie) PICC numerical imagery' @ 50.528 5.656
on black.png: over a normal JOSM background: lines are coarse, names are barely readable
on white.png: with canvas { fill-color: #E3E3E3; }: lines are fine, names are OK
but now OSM elements that are whiter are less or barely readable, such as house numbers
You can try the layer alone.
The problem is that that transparent layer is designed to be displayed on a white background.
The idea is that inverting its colors would have it display better on a black background.
Another option would be to invert OSM colors, but rasterfilters is for rasters only.
And, as discussed in the past, JOSM CSS does not provide it.
(I just checked that "filter: invert(100%);" doesn't work)
Thanks.

Changed 5 years ago by A_Pirard

Attachment: black.png added

Changed 5 years ago by A_Pirard

Attachment: on black.png added

Changed 5 years ago by A_Pirard

Attachment: on white.png added

comment:7 Changed 6 weeks ago by sharcrash

Hello I'm digging out this issue as I encounter the same problem: no difference between ticked and unticked "Invert Color". This plugin would be a great fix for a useful resource i have though. It's a layer rendering Belgium's terrain surface in grey-scale via LIDAR technology but the colors were inverted giving us the impression that the surface is also inverted. I tried to trick my mind and just apply the opposite for the features i'd like to add, such as cliffs, but it's way harder than what it seems, also because the resolution of the rasterized image is of poor quality.

Also i'd like to add: to access the "Choose Filter dialog" (having the button not greyed out), the layer to be altered needs to be the active layer whereas to edit OSM's data, the "Data Layer" needs to be the active layer. Not a problem though if the invert filter works and stays activated if we put back the "Data Layer" as active layer.

comment:8 Changed 4 weeks ago by sharcrash

Today i noticed that the button was not greyed out, weird... So I gave it a try again and it works. Awesome!

I really don't know why it didn't work at first. I'm sure i've had done a reboot of JOSM and i've had gone through the same steps to activate the filter in the window dialog. In the mean time, i think the plugins got updated (unless it was on my laptop on which i contribute occasionally), so if you've done anything, that might be it. Thanks!

Last edited 4 weeks ago by sharcrash (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Nipel-Crumple.
as The resolution will be set.
to The owner will be changed from Nipel-Crumple to the specified user.
The owner will change to A_Pirard
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from Nipel-Crumple to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.