Welcome, Guest. Please login or register.

Author Topic: question for the Arexx gurus out there!  (Read 2260 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ilgulamcTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 202
    • Show only replies by ilgulamc
    • http://digilander.iol.it/ilgulamc
question for the Arexx gurus out there!
« 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.
Assai sa\\\' chi sa\\\' che non sa\\\'
 

Offline ilgulamcTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 202
    • Show only replies by ilgulamc
    • http://digilander.iol.it/ilgulamc
Re: question for the Arexx gurus out there!
« Reply #1 on: March 25, 2003, 01:17:14 PM »
please help me! :-o
Assai sa\\\' chi sa\\\' che non sa\\\'
 

Offline ilgulamcTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 202
    • Show only replies by ilgulamc
    • http://digilander.iol.it/ilgulamc
Re: question for the Arexx gurus out there!
« Reply #2 on: March 26, 2003, 08:25:25 AM »
Please at least tell me if this would be possible, and what i would need in order to do it.
Assai sa\\\' chi sa\\\' che non sa\\\'
 

Offline Desmon

  • Sr. Member
  • ****
  • Join Date: Feb 2002
  • Posts: 282
    • Show only replies by Desmon
Re: question for the Arexx gurus out there!
« Reply #3 on: March 26, 2003, 08:32:40 AM »
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.

Cache Ya,
Craig.


Busy playing with my Trainz and loving it!
 

Offline pVC

Re: question for the Arexx gurus out there!
« Reply #4 on: March 26, 2003, 10:16:31 AM »
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
 
Daily MorphOS user and Amiga active.
 

Offline sarkis

  • Jr. Member
  • **
  • Join Date: Apr 2002
  • Posts: 95
    • Show only replies by sarkis
Re: question for the Arexx gurus out there!
« Reply #5 on: March 26, 2003, 11:12:16 AM »
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
 

Offline trgse

  • Full Member
  • ***
  • Join Date: Jul 2002
  • Posts: 150
    • Show only replies by trgse
    • http://hem.fyristorg.com/TRG/
Re: question for the Arexx gurus out there!
« Reply #6 on: March 26, 2003, 11:14:38 AM »
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.
MacOS X rulez!

Quad Mac Rulez!
 

Offline trgse

  • Full Member
  • ***
  • Join Date: Jul 2002
  • Posts: 150
    • Show only replies by trgse
    • http://hem.fyristorg.com/TRG/
Re: question for the Arexx gurus out there!
« Reply #7 on: March 26, 2003, 01:21:59 PM »
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.
MacOS X rulez!

Quad Mac Rulez!
 

Offline ilgulamcTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 202
    • Show only replies by ilgulamc
    • http://digilander.iol.it/ilgulamc
Re: question for the Arexx gurus out there!
« Reply #8 on: March 26, 2003, 04:49:21 PM »
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
Assai sa\\\' chi sa\\\' che non sa\\\'