sepinf-inc / IPED

IPED Digital Forensic Tool. It is an open source software that can be used to process and analyze digital evidence, often seized at crime scenes by law enforcement or in a corporate investigation by private examiners.
Other
949 stars 219 forks source link

Apply dark theme to maps. #1443

Open patrickdalla opened 1 year ago

patrickdalla commented 1 year ago

Apply dark theme to maps.

patrickdalla commented 1 year ago

The implemented code was pushed to MapDarkTheme branch.

patrickdalla commented 1 year ago

It applies 3 filters to openstreet maps tile images: hue-rotate(180deg) brightness(80%) invert(1); The initial hue-rotation keeps blue color (sea and rivers) still blue, and green color (some represented forests and parks) still green after the color inversion.

patrickdalla commented 1 year ago

For example: The following original plotted map: image after the filters becomes: image

lfcnassif commented 1 year ago

Great! Thank you @patrickdalla

lfcnassif commented 1 year ago

Just noticed the new map dark theme made map dragging/translation/zoom very very slow. I think it should be improved, the usability was affected a lot, so I'm reopening this. It is very slow on my machine, maybe it could be unusable on some user machine. A simple but faster filter would be much better in my opinion.

patrickdalla commented 1 year ago

Yes, it consumes CPU as it applies image processing filter on every image (what I think makes the low battery usage supposed advantage of dark mode disappear). For now, I don't see other way. As the tile images are loaded from third parties, they should keep a 'dark' version, and IPED should change the tile server url to this new tile server. So IPED should keep some mapping between the light and dark url version of some tile server. Maybe we can keep the map only in the user selected URL and not change it on IPED color theme change. So if the user wants a DARK version, he should configure a DARK tile server.

lfcnassif commented 1 year ago

I'm not sure if changing the tile server automatically is a good idea... If there is no faster filter to be applied, I prefer to disable the feature for now and use the faster light theme always. Is it ok for you?

patrickdalla commented 1 year ago

Yes. No problem.

Em ter., 24 de jan. de 2023 08:26, Luis Filipe Nassif < @.***> escreveu:

I'm not sure if changing the tile server automatically is a good idea... If there is no faster filter to be applied, I prefer to disable the feature for now and use the faster light theme always. Is it ok for you?

— Reply to this email directly, view it on GitHub https://github.com/sepinf-inc/IPED/issues/1443#issuecomment-1401855328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG247S5BWGJFHHFR2T4RQC3WT7DAXANCNFSM6AAAAAASP6KJE4 . You are receiving this because you were assigned.Message ID: @.***>

lfcnassif commented 1 year ago

Just disabled it with commit above. Please double check it, since the merged PR mixed several features and I'm not sure which commits refer to dark theme. I recommend putting the issue number before each commit message, so we can find all of them easily to cherry-pick, revert, etc, and commits start to be listed in the related issue.