Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: ilgulamc on March 25, 2003, 09:18:24 AM
-
Hello people,
I really have a problem. I know less than nothing about arexx...
My problem is that I would like to tell photogenics2 to go and open automaticly a directory full of pictures named "pic0001.jpg" "pic0002.jpg" and so on, and open one picture at a time, apply an effect, save the picture and do the same with the next one.
Could somebody please help me? I think that photogenic's arexx port is named photogenics.1
I would really appreciate your help, thanks in advance.
-
please help me! :-o
-
Please at least tell me if this would be possible, and what i would need in order to do it.
-
This is certainly possible. I have absolutely no experience with Photogenics, but the ARexx parsing should be simple enough.
Email me here and I'll happily show you how to parse a directory full of filenames. Adding the effect(s) and closing each file again should be easy enough, if Photogenics' ARexx port is capable.
-
Here's really quickly made script for it... it may be ugly, but at least you get started :)
This converts pic0001.jpg to newpic0001.jpg etc in defined directory (path).
Save following text to file (don't forget the first commentline) and run it with rx when Photogenics is running:
/* photogenics test */
options results
/* ======config====== */
path="ram:"
verbose=1
jpegquality=80
/* ===end of config== */
address PHOTOGENICS.1
DO i=1 TO 9999
num=RIGHT(i,4,'0')
IF EXISTS(path'pic'num'.jpg') THEN DO
LOADHIDE path"pic"num".jpg"
image=result
/* put the wanted effect here */
PAINTMODE image "Brightness"
MODEOPTS image 150
FILLIMAGE image
FIX image
/* end of effect */
SAVE image "JPEG" path'newpic'num'.jpg' jpegquality
CLOSE image
END
ELSE EXIT
IF verbose=1 THEN say 'Image 'path'pic'num'.jpg done.'
END
EXIT
-
Hi,
Two avenues come to mind..
Batch Factory by Visual Inspirations..has a web page.Will do it with a ready made script with a small amount of modification
Arexx Group @ yahoo.com
Sarkis
:-D :-D
-
there is a easier way to handle that.
since I did a similar (but diffrent) arexx proggy for ArtEffect
it goes into a directory makes a list of all files in the directory
then you simply traverse the list until you reach the end of the list, at work currently will send a bit more info later.
-
here is the code
IF ~SHOW('L', "rexxsupport.library") THEN
IF ~ADDLIB('rexxsupport.library', 0, -30) THEN DO
REQUESTNOTIFY TITLE '"System error"' PROMPT '"rexxsupport.library
could not be opened"'
EXIT 10
END
/*
this is actually a internal arteffect function
so change it to either a photogenics function that does the same or use the requestfile etc. files (or the asl.library as a rexx library)
*/
REQUESTFILE VAR carddir PATH "PROGDIR:" TITLE '"Choose the cardset directory"' DIR
filelist = ShowDir(carddir, FILE)
LOCKGUI
DO WHILE ~(Compress(filelist) = "")
currfile = SubWord(filelist, 1, 1)
extension = upper(substr(currfile, lastpos(".", currfile)))
newfilename = carddir || currfile || ".jpg"
END
END
filelist = SubStr(filelist, Length(currfile)+2)
END
EXIT
you will have to add some photogenics specific stuff like loading etc.
-
thank you all people!
It is always so nice to receive help from the community.
No matter all the flame wars out there, the real community still helps illiterate (like me) amigans :-P