Page 1 of 1
How to add Banner at bottom of image
Posted: Mon Jul 01, 2019 10:15 pm
by trags3
Hello again,
I have a mobile app that can take a picture using the camera. I want to add a banner to the bottom of the picture and then email it. Is this possible?
Tom
Re: How to add Banner at bottom of image
Posted: Tue Jul 02, 2019 7:03 pm
by trags3
Hi All,
I decided to put the banner on top of the image, Print to PDF and email or text it.
That will work for me in my application. Won't work on Android, however.
Tom
Re: How to add Banner at bottom of image
Posted: Tue Jul 02, 2019 7:18 pm
by mrcoollion
Re: How to add Banner at bottom of image
Posted: Tue Jul 02, 2019 9:31 pm
by simon.schvartzman
Hi Tom, I have an app that does what you want (picture with banner) and works on both iOS and Android. I'm able to share the image through email, text, etc (never tried PDF).
I'm using basically the approach pointed out by @mrcoollion (group all the pieces together and then export the group).
Maybe I can help if you share your basic code or even if you explain better what you mean by "Won't work on Android, however"
Best
Re: How to add Banner at bottom of image
Posted: Thu Jul 04, 2019 1:06 pm
by trags3
Hi Simon,
I have a field with a banner at the bottom.
Here is the code I used.
mobilpickPhoto "camera" , 750,500
if the result is text then
put the result into img"the_Image"
show img"ban.jpg" ---This is the banner
set the level of img"ban.jpg" to 10 ----This insures the banner is on top
Then when I want to send the picture I hide the controls on the card and print the card to pdf
It's pretty clumsy but works.
What I meant by won't work on android is "Print to PDF" isn't available on android.
I like mrcoollion's solution much better.
Cheers
Re: How to add Banner at bottom of image
Posted: Thu Jul 04, 2019 2:10 pm
by Klaus
trags3 wrote: ↑Thu Jul 04, 2019 1:06 pm
...
set the level of img"ban.jpg" to 10
...
I know you mean LAYER, of course! But this (LEVEL) works?
Did not find it in the dictionary nor does it give any result when querying -> put the level of btn 1
I do not own any mobile device and I am always surprised how users use a syntax NOT described in the dictionary and which obvioulsy works (does it really?)!
From the dictionary
...
If the source type is not available on the target device, the command returns with result source not available. If the user cancels the pick, the command returns with result cancel. Otherwise a new image object is created on the current card of the default stack containing the chosen image.
...
Means to me, since "cancel" and "source not available" is also text, this line will do not what you want:
Code: Select all
...
if the result is text then
...
So I would script this in case of success:
Code: Select all
...
if the result = EMPTY then
...
And the command will automatically create a new image object on oyur card, so this "should" not work, too:
Code: Select all
...
put the result into img "the_Image"
...
Very puzzling!
Re: How to add Banner at bottom of image
Posted: Mon Jul 08, 2019 5:28 pm
by trags3
Hi Klaus,
Thanks, After the holiday I have checked my code.
The "level" statement was indeed "Layer" I was in a hurry when I posted. Don't know if "level" works or not!

The statement
put the result into img "the_Image"
does work but I think that is because I have an Image object named "the_Image".
I will clean things up!
Thanks all again!
Tom