in reply to Clearing image Bits

GD knows how to get & set pixels, and (once installed) is pretty easy to use, but the biggest problem you will face going by your description is deciding which pixels need changing. And once you've decided which portions of the image you are going to change, how you will convey that information into your program.

Determining whether a part of an image is "shaky" programmically, is a complex process. You would need to inspect the whole image in small overlapping groups of pixels at a time and use some sort of edge detection algorithm. This is distinctly non-trivial, and that type of image processing is definitly not Perl's forte. Accessing each pixel via perl method call (repeatedly) is going to make for very slow processing, even if you come up with a suitable algorithm.

If this is a one time, single image change then you'd be better off using one of the many image editors available. This will allow you to make the determination of what to change visually and then indicate the area(s) using a rubber-band selection process with the mouse.

If you anticipate having to deal with this problem on a regular basis, investing in a tripod or a camera with an anti-shake device would be the simplest option :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.