Topic: attachment_fu and watermark
I have two question concerning attachment_fu. I want to add a watermark to a resized version of an image:
1. At first I added the watermark with system-calls to ImageMagick-tools, but that consumed a lot of memory. Now I'm using gd2 to do add the watermark, but it seems it doesn't work with certain images (e.g. images which were saved with Photoshop's 'save for web'-option). Is there any free Unix/Linux-tool do this job? Or do you have any other ideas??
2. ImageMagick resizes the images after every update. That is pretty inconvenient because the pictures are very large, thus the resizing takes some time. I fixed that problem. But I use after_attachment_saved to add the watermark to the image. This callback gets still called after every update, watermarking the picture every time. Right now I prevent this by checking created_at is under 1 minute ago. But this seems pretty hacky to me.. does anybody know a better solution?