Re: filename to bitmap
Re: filename to bitmap
- Subject: Re: filename to bitmap
- From: Brennan <email@hidden>
- Date: Tue, 16 Oct 2001 22:34:43 +0200
has <email@hidden> wrote
>
Photoshop's Actions are just dumb macros: record and run... and run... and
>
run. No variables, control statements, subroutines, etc: it's no 'scripting
>
language'. There's been times when I've recorded quite complex actions but
>
would have killed for a simple if...then statement.
Well, even being able to get something like the width or color depth of the image into the filename (a completely linear task) is impossible. I once worked on a website where somebody had had the dumb idea of having the width and height of every image as part of the filename as a naming convention. Every time an image was modified so that it changed size, you had to modify the filename and the html code. Of course, nobody on the team had any scripting chops, and photoshop couldn't do it either. Total nightmare.
>
The solution is simple (in principle at least): Adobe should add AS support
>
to Photoshop, either by licencing Photoscripter or rolling their own. e.g.
>
They added AS support to Illustrator 9 through licencing and bundling a
>
3rd-party solution (though the Joe Average would be lucky to notice it
>
exists since it's not part of the standard install... bizarre).
Neither Adobe nor Macromedia have got behind Applescript in anything but a lukewarm fashion. Oddly enough, imageReady has a better macro engine than Photoshop. What's up with that?
>
The best way to get Adobe to deal with all of this is for lots of users to
>
jump up and down asking them for real scripting support. If they know
>
there's lots of demand they're more likely to do something about it.
I agree with this, and I really hope that the GIMPs headstart on OSX will do something to raise awareness of the power of a scriptable image editor.
Ever since Director 8 allowed people to script the creation and modification of bitmaps, there have been some remarkable creations appearing in that community - the kinds of things that you would never dream of doing in Photoshop or After Effects. I'd even go so far as to say that Director is one of the best scriptable image editors available for the Mac today! (Shame is, it's not really Applescriptable).
BTW, I had occasion to play with Photoscripter the other day. The dictionary looks fantastic and surprisingly thorough, but in practice, it seemed not to behave how I expected. I really didn't give it enough time, though. Is there a serious review (i.e. written by and for Applescript-savvy people) of Photoscripter online anywhere? Any comments from people on this list?
I'm really surprised they don't post the photoscripter dictionary on the mainevent website. I am sure it would increase sales, and perhaps bring the price down a bit. Right now it's like buying a pig in a poke, especially considering there are so many non-pork* applescript implementations out there. The price would make your hair stand on end. You're supposed to spend $299 just to _evaluate_ the software? I'm shocked!
>
[snip Brennan's rather nice script]
>
>
The only problem with this script is that it writes a new file over the
>
existing one, so you lose the original file's resource fork (preview image,
>
custom icons, etc) and changes the creator code to the default
>
(pictureviewer).
Yes, I noticed that, but from what the original poster asked, he actually wanted to overwrite the original. I did have a version which made a new file with an underscore at the beginning of the name, but I scrapped it. My script also makes no checks that the original file is indeed a JPEG, which is perhaps even more dangerous, because it would end up as a JPEG afterwards, even if it was called "whatever.PSD".
Still, as we all know, if you handle all the exceptions, your script typically more than doubles in size which is not so good if you just want to do something quickly.
-Brennan
*'Pig in a poke'. A 'poke' is a kind of sack, or bag. In the old days, scam artists would put a cat into a bag and sell it to gullible folks claiming that it was a pig. Of course, if they 'let the cat out of the bag' the game was up. Caveat Emptor!