Cgeo: SVG file not shown in cache listing

Created on 23 Feb 2020  路  7Comments  路  Source: cgeo/cgeo

To Reproduce:
Steps to reproduce the behavior:

  1. Open https://coord.info/GC77W9X in c:geo

Actual behavior/state after performing these steps:
The listing has an embedded svg graphic file located at http://www.gcscript.de/GC77W9X (be aware the graphic file contains a text, so one might oversee it), it is not loaded in c:geo.
Also the galery tab fails to load it and contains only a placeholder.

Expected behavior/state after performing these steps:
SVG file being shown

Version of c:geo used:
2020.02.22-NB

Is the problem reproducible:
Yes

Bug

All 7 comments

Just viewed GC77W9X in my Android's Firefox ... and did not see the .svg either ... *wonder* ... until I disabled the FF AddOn "Dark Background and Light Text" ... in fact switched the background to "standard white". ;)

Thus even just displaying the .svg would not make any difference at all, if "dark mode" is active ...

Hence, further thought: Should .svg (and consequently probably .gif, .png and .tif as well, as these support transparency, too) be displayed with a "contrasting" (forced) background? As is already the case with (too) dark colored text? And how (if at all, cause not all of them are as easy parseable as an .svg) can one tell which color is suitable for the current pic ...? ;)

Would be a good idea, but how can we detect alpha in images? What solution
works for any image content? Would a solution be to just always set a
contrasting background to the theme on the img element? We could also
introduce a quick theme switching menu entry for such a purpose.

P.S. @MagpieFourtyTwo Whoops most of those points you already raised, read too quickly 馃

Would a solution be to just always set a contrasting background to the theme on the img element?

Would not help with transparency in most cases, I guess, cause if the CO uses transparency in his pic, we can (hopefully) assume that he has already chosen an appropriate content color (depending on his intention, thus if he wants the content to be visible at first glance, or to be kind of hidden).

In case of GC77W9X the .svg was made to be visible, with black text on transparent background, which means in fact black on white by default. But by underlaying it with a theme contrasted background (whereas background is light, by default, thus the theme contrasting background for the .svg would be black) would make the .svg "invisible" again.

My conclusion: Although transparency checks can be done easily with .svg and can even be overridden by external CSS, this would perhaps lead to far (but I could be wrong, because of too little knowledge of c:geo's internals - but would c:geo look into the content to be displayed?), so I would say it would be sufficient to always put a white background behind transparency capable image types.

This isssue has nothing to do with transparency check in c:geo but IMHO it is just not loaded in c:geo.

Yep, right - just thought two steps further ... sorry. ;)

So, Farbe ist ge盲ndert, damit auch die Schwarzseher was sehen.

Svg can be used for icons? See #9088

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smico picture smico  路  7Comments

SammysHP picture SammysHP  路  6Comments

Lineflyer picture Lineflyer  路  7Comments

samueltardieu picture samueltardieu  路  3Comments

thepetas picture thepetas  路  4Comments