Saturday, February 21, 2009

Lightboxes, Zen-Cart, Oh My!

Recently, a customer asked if they could have image effects on their e-commerce store graphics -- having played around with Wordpress for a while, I knew about Lightbox, which uses either jQuery, Prototype or MooTools in order to show images in a seperate raised window with fancy effects (watermarking, shadowing, etc) while transparently showing the original page in the background.

What I didn't know -- was exactly how many variations of the Lightbox there are.

This site has to be one of the best for deciding which one suits your needs and application best, a must bookmark for anyone interested in knowing the compatibility and abilities of the interschnitzels new 'buzz app'

Sunday, February 8, 2009

Creating Transparent .GIFs from .PNG's

Easy one-liner using "convert" from the Imagemagick graphics suite to get decent .gif conversions of most* transparent .png's.

convert [imagename].png -channel Alpha -threshold 80% [imagename].gif

This converts the Alpha channel (the one IE6 has the most problem with) to either completely transparent or opaque based on the 80% threshold.

I say most, because it doesn't work for things like backgrounds or overlays (which are often too dark -- greys are often black, for example.) -- you can change 80% to 60% if you have backgrounds of mostly one colour, but it's not foolproof and often leaves darker marks around the exterior of the image.