Hi John,

This is fairly trivial (god I've been dying to feel that way about something in Perl) 
for GD.pm.

The only problem is you may have to convert your gifs to png, because gif support in 
the module got yanked out a few years ago.  I've used the module to change image 
copyright notices by blanking out old dates and adding new ones (don't panic, my own 
images).

Once your graphics are in png, working with them using png is a snap.  I've even used 
it to reshade the various shades of grey used in font image gradients when copy the 
image from a white background to a dark blue.

Basically you can either do a fill if the geometry permits, or if not, run a pixel by 
pixel doulbe loop through the image and change the pixel whenever you discover the 
color to be replaced.

GD is the only module I truly love.  You can see the button example here:

http://www.joyo96.org/cgi-bin/henshall.pl?hen=3

The original images are similar to these:

http://www.joyo96.org/cgi-bin/xref.pl

(THe images I'm referring to are the little kanji characters.)

Let me know if I can add anything else...

Jim




On Jun 18 13:08, John Sequeira <[EMAIL PROTECTED]> wrote:
>
> Subject: [Boston.pm] Scripted image manipulation
>
> 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.
> 
> 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.
> 
> Anyone have any experience or suggestions for doing this with free
> software?
> 
> I'm pretty sure you could do this in a photoshop macro,  but I don't own
> it and  I'd prefer using something like Gimp::Fu or ImageMagick
> 
> Thanks,
> 
> John Sequeira
> http://radio.weblogs.com/0103492/
> 
> 
> 
> _______________________________________________
> Boston-pm mailing list
> [EMAIL PROTECTED]
> http://mail.pm.org/mailman/listinfo/boston-pm
> 
> 
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to