This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Paint Shop Pro support > December 2004 > a way to insert/embed file info on an image





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author a way to insert/embed file info on an image
Pippo

2004-12-24, 12:15 pm

Is there a way to quickly insert the filename into an image with psp? I'd
like to do that for multiple images (some landscapes) in order to use them
as background in videoke files, so the landscape will show immediately
(let's say, bottom right...) a clue to where it refers to.

Thanks for any help, Guido


Kris Zaklika

2004-12-24, 7:16 pm

Pippo wrote:
>
> Is there a way to quickly insert the filename into an image with psp? I'd
> like to do that for multiple images (some landscapes) in order to use them
> as background in videoke files, so the landscape will show immediately
> (let's say, bottom right...) a clue to where it refers to.


Just do it with a script. You can use the SimpleCaption and
EXIFCaptioning scripts as models of what to do.

> Thanks for any help, Guido

Pippo

2004-12-26, 12:15 pm

Thanks for your suggestion, Kris, "simplecaption" script seems to work with
me, tho I'm not a genius in scripting and programming, so I'd like to work
a bit on it but don't know how.
Actually, I understand that ANY psp script just collects various psp
commands/actions.
1) I tried to edit via psp the script, but it doesn't open it (is it because
it's a script-rescripted?)
2) What I essentially would like to do is to avoid that great amount of
added space (in grey) in the canvas: I agree that putting the caption
OUTSIDE the image is a good point, but that's really too much, so...
3) I tried to open it via text editor and substitute in this part

# now increase the canvas size, based on the original size
XAmount = int(Target.Width * ExpandEdges)
YAmountTop = int(Target.Height * ExpandEdges)
YAmountBottom = int(Target.Height * ExpandBottom)

NewWidth = Target.Width + 2 * XAmount
NewHeight = Target.Height + YAmountTop + YAmountBottom

number 2 with a lower number, 1, 1.1, or so... then saved the script, closed
psp, re-opened it, reused it, but nothing changed. Also, saving the script
with a new name, once re-opened psp it didn't see the new script.
4) At this point all I would be satisfied with is... how to get the "file
name" caption? In the script I see:

# now prompt the user for the caption to user
Result = App.Do( Environment, 'GetString', {
'DefaultText': DefaultCaption,
'DialogTitle': 'Enter Image Caption',
'Prompt': 'Enter a caption for the image. This will be below
the image and centered.',
'MaxLength': 40,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Interactive,
'AutoActionMode': App.Constants.AutoActionMode.Default
}
})
if Result[ 'OKButton' ] == App.Constants.Boolean.false:
return

CaptionText = Result[ 'EnteredText' ] # save this for later

Where is this "Environment, 'GetString', {
'DefaultText': DefaultCaption,"?
Can't I use it without a script... ? Or just use it and then create my own
script with the record button for dummies ? :-)

Thanks for help!!!
Guido



"Kris Zaklika" <Kris.Zaklika@corel.com> ha scritto nel messaggio
news:41CC4C32.19DDE1E1@corel.com...[color=darkred]
> Pippo wrote:
>
> Just do it with a script. You can use the SimpleCaption and
> EXIFCaptioning scripts as models of what to do.
>


Fred Hiltz

2004-12-26, 12:15 pm

Pippo wrote:
> Thanks for your suggestion, Kris, "simplecaption" script seems to
> work with me, tho I'm not a genius in scripting and programming,
> so I'd like to work a bit on it but don't know how.

[snip details]

Welcome to the world of scripting, Guido. The three resources for
learning it will answer these questions and the others that always
come up when learning a new programming language.

1. Help > Contents > Automating Tasks has several chapters on
scripts.

2. Scripting for Script Authors.pdf at
ftp://ftp.jasc.com/pub/en/psp900enscp.exe describes the PSP
environment in which Python runs. It contains suggestions for
Python-aware text editors and links to further Python knowledge.

3. Scripting API at ftp://ftp.jasc.com/pub/en/psp900enapi.exe is the
reference source for all details about the PSP interface to Python.
--
Fred Hiltz, fhiltz at yahoo dot com


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews