Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

X3 reading of map GeoData in PNG files

05 Jul 2023, 20:42

Hello, Karl,

Once again I am (most-likely) trying to do the impossible  :upside_down:.

A few weeks ago, you helped me HERE with my user-created map buttons, and at that time you mentioned:
The hover-map appears as a result of the X3 map button enabled. It's really only a coincidence that it piggy-backs your own map button, because it has the same target classes as the native map button.

I realize that by default, map GeoData is NOT stored in PNG files, but I managed to find a way to actually insert map GeoData into some PNG files, and confirmed that the PNG files now actually do contain the Geo location coordinates.  (I confirmed this, by sending two PNG files, 1 with Geo data and 1 without Geo data to my iPhone, and my phone successfully displays the Geo location on a map for my PNG file with the Geo data.)

In THIS gallery, I have three PNG files that I've Geo coded, along (for now) with their respective JPG copies.  For now, I am not including your special CSS custom code that hides X3's map button in that gallery, but will eventually have it hidden.

X3 is working great with the three JPG files, in that my custom-map buttons (top) in the JPG files piggy-back off of X3's map buttons (bottom) to show their respective map previews.  However, with the three PNG files, X3 does not display the X3 map buttons.  My custom-map buttons still work perfectly, it's just that the three PNG files do not show the map previews.

Am I correct in assuming that somewhere in X3's code, X3 checks & displays a map preview only if the image is a valid type, such as JPG?  If that is indeed the case, am I able to modify that X3 file (or files) to have X3 indeed display map previews also for PNG files?

Thank you in advance & have yourself a great day.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: X3 reading of map GeoData in PNG files

05 Jul 2023, 22:08

JMM wrote: Am I correct in assuming that somewhere in X3's code, X3 checks & displays a map preview only if the image is a valid type, such as JPG?  If that is indeed the case, am I able to modify that X3 file (or files) to have X3 indeed display map previews also for PNG files?
Unfortunately, PHP simply does not support EXIF in PNG images ... Actually, PNG images do not support EXIF at all, but I assume there are some "workarounds" to inject the same info into the files header. And yes, therefore X3 will by no means display EXIF info for PNG files, or trigger any related behavior (map buttons, with hover).

This issue is getting a bit overcomplicated. I don't want to even think about trying to trigger Javascript code that is not made available, it would be a lot of research and work. Besides, why not just export to high-quality jpeg? Problem solved ...
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: X3 reading of map GeoData in PNG files

05 Jul 2023, 22:14

Completely understood.  No problem.

Have a great day.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |