Here's my situation. I'm writing a script that takes a greyscale GIF image and treats it as a 'channel' used to mix two colours and create a colourised version of it. So far things are good. It works exactly as I'd like it to, 'cept its slow. Real, real slow. Without further ado, I put together this page:
http://www.g33kz.co.uk/mh_channel_mix/source.php
You can see the whole source of the script there and test it out using the form at the bottom. I know there's a lot of work still to do, especially in error handling etc. but I want to clear up the performance issue first.
If you read the ISSUES and TODO areas of the comments you'll see a couple of ideas I've had, but before I embark upon them I wanted to run the code by a few more minds.
If I do choose to write my own gif interpreter/writer, I'll need to know how a gif is put together. I know that GIFs are a 256 colour palette followed by a bitmap, all compressed with LZW (it is LZW, right) compression. Still, I wouldn't have the first clue how to read it, decompress it and interpret it the way GD does.
Many thanks in advance. You're all beautiful.
|