Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I realise this might be posted somewhere, but I wasn't able to find it. I'm trying to add blur to the bottom section of 50,000 images. So far I've been able to achieve this for a single image (800 x 600) using the following code:
fmw42 wrote:Assuming you only want JPGs and they are all the same size (for your blur image), then ...
If the images are all the same size and the blurred section is in the same location on all of them, the command inside the loop could be as simple as this...
%IM%convert toes.png -gravity south -region 100%x30% -blur 0x3 b.png
For some reason I thought "-region" hadn't been implemented in IM7 yet, but trying that command with 7.0.2-9 on Windows 10 64 it seems to work perfectly.
I used the "-extent ... -extent ... -blur ... -composite ..." command to make a soft edge on the blurred section, but for pure simplicity, using "-region" like you have there seems like a better approach.
That starts by telling the image and the following crop to obey "-gravity south". Next it crops out a copy of the specific area to be blurred with "-crop 550x40+0+10", in this case the geometry for the "image1.jpg" sample provided above. Then it uses the page information to flatten that cropped piece onto a transparent background with a viewport of the original image size. Now the blur can feather out past the cropped area onto the surrounding transparent canvas. Simply composite that layer back onto the original and save as...
Thanks everyone for all your help! Really appreciate it. (FYI - these images are owned by myself, and it's actually the time/date stamp that we're trying to hide more than the copyright notice). Cheers