Center image over background color taken from corner

Posted by joebert on Stack Overflow See other posts from Stack Overflow or by joebert
Published on 2010-06-05T23:17:17Z Indexed on 2010/06/05 23:22 UTC
Read the original article Hit count: 170

Filed under:

I'm looking for a way that I can take say, a 200x200 pixel image and center it over a background that's 500x500 pixels. The background should be the color of the top-left corner of the 200x200 pixel image.

I get the -gravity and -fill flags, but I'm having trouble finding a way to grab that top-left corners color to pass to the -fill flag.

© Stack Overflow or respective owner

Related posts about imagemagick