On Wed, 18 Jun 2003, John Sequeira wrote:
> I'm working on a web site that would like to change their color scheme.
> They have about a thousand images (buttons/widgets/etc) and I was
> wondering if there was a easy way to do this programmatically or at
> least give the manual process a big head start.
As much fun as this would be to do in Perl, I wouldn't be surprised if a
skilled Photoshop monkey could do this once, automate it, and have the
whole batch accurately done in about five minutes.
The Gimp may make this kind of thing possible as well (via ScriptFu and
such), but as little as I've worked with Photoshop, I've worked with the
Gimp even less; I'm told its automation isn't as robust as Photoshop's,
but surely with Perl plugins you should be able to do whatever you want.
Have you taken a look at _Perl Graphics Programming_?
http://www.oreilly.com/catalog/perlgp/
The code samples from that book are at
http://shawn.apocabilly.org/PGP/
That material might get you much of the way to where you want to be.
> Since the elements of the site are 2D (no gradients) I would think the
> bulk of the work could be accomplished by simply doing a find/replace on
> certain color values.
That can be problematic, depending on the file format etc. It sounds like
you're suggesting fiddling with bit values directly in the files; this may
work, but you're much better off using one of the graphics libraries as an
abstraction layer.
It looks like the relevant suggestions from _PGP_ above all revolve around
GD, ImageMagick, or the Gimp (I'm assuming these aren't PostScript or PDF
or SVG graphics -- just GIFs or JPGs). I haven't worked with this stuff to
be able to recommend one or the other library for this, but take a look at
the book and you might be able to narrow things down a bit -- I'm guessing
that ImageMagick scripts will be able to do this pretty succinctly.
Whatever you write to automate this, make sure you have backups! Either
have the script save a copy of the original file, or have it work in a
duplicate file tree, or just have the originals saved onto a CD-R or
something. Experience has taught me that automagically clobbering page
graphics is generally not a fun thing to have to rebuild... :)
--
Chris Devers [EMAIL PROTECTED]
parentheses, n. pl.
(A (pair (of symbols (referred to as (open) and (closed)))) each) of
which) has the (hold (down) ((to) (repeat) option) on a
((LISP)-(oriented) keyboard)).
-- from _The Computer Contradictionary_, Stan Kelly-Bootle, 1995
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm