Help with editing the custom thumbs info needed.

Post Reply
Ulrich
Posts: 26
Joined: 14 Jul 21 12:59

Help with editing the custom thumbs info needed.

Post by Ulrich » 19 Aug 21 7:15

I would like to add a new custom thumbs info line that shows if a file has GPS Information added or not.
I know this is easyly done with %ImageHasGPS. This results in "yes" or "no" in that line.
For the sake of clarity ( because I would like to add some more information on a single line) I would like to show an indicator only if there is a GPS Info.
Perhaps "GPS" if the info is present and nothing if not.

I tried to start with the pascal script language and tried many different versions of

Code: Select all

%code 
begin 
	if ImageHasGPS then 'GPS';
end; 
%/code
All of them failed...
What is done wrong?

https://repository.idimager.com/documentation.asp doesn't help me find the problem.
Is there any further source where I can try to learn more about the photo supreme API?
A readable Object-Model description? Color Code Listings? Examples for beginners?

Mke
Posts: 606
Joined: 15 Jun 14 15:39

Re: Help with editing the custom thumbs info needed.

Post by Mke » 19 Aug 21 15:23

Through playing based on other code posted here, I've come up with something that more-or-less does what you want:

Code: Select all

%code result := 'GPS %ImageHasGPS{encode=html}' %/code
However (until now) I've coded nothing in Pascal, and not much in anything else, so there's probably a better solution.

Ulrich
Posts: 26
Joined: 14 Jul 21 12:59

Re: Help with editing the custom thumbs info needed.

Post by Ulrich » 19 Aug 21 17:18

Hi Mke,
thank's for your help, but that's not was I was exactly looking for.
If there is no GPS Info in the file, nothing should be shown, if there are GPS Infos in the file, I would like to see an 'GPS' Indicator.
Your solution shows "GPS Yes" or "GPS No", which is more or less the same than 'GPS %ImageHasGPS' without pascal code.
Thank you anyway

Ulrich
Posts: 26
Joined: 14 Jul 21 12:59

Re: Help with editing the custom thumbs info needed.

Post by Ulrich » 20 Aug 21 6:24

I've got it!

Code: Select all

%code
  if ImageItem.HasGPS then 
  begin
      	result := '<font bgcolor="#FF0000" color="#FFFFFF" bgradius="0.3">&nbsp;&nbsp;' + 'GPS' + '&nbsp;&nbsp;</font>&nbsp;';
  end;
%/code

Hert
Posts: 6980
Joined: 13 Sep 03 7:24

Re: Help with editing the custom thumbs info needed.

Post by Hert » 20 Aug 21 8:35

Great. Here's how to do it without scripting:

Code: Select all

%GPSExists<font bgcolor="#FF0000" color="#FFFFFF" bgradius="0.3">&nbsp;&nbsp;GPS&nbsp;&nbsp;&nbsp;</font>%/GPSExists
This is a user-to-user forum. If you need product support then please send a message

Post Reply