Results 1 to 2 of 2

Thread: Enlarge image canvas using ImageMagic

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Location
    Brooklyn, NY
    Beans
    116
    Distro
    Ubuntu

    Enlarge image canvas using ImageMagic

    I've been learning about ImageMagick & it's great! The one thing that I can't learn to do is to expand the canvas size. So if the ratio is 3x2, I want to add extra white space to make it 3x3. If I use the -geometry function, it enlarges the image to the proportions I want, but it loses the aspect ratio.

    If you turn to page 377 (or 388 in PDF) of the User Manual, under "Montage", you'll see that ImageMagic can do what I want. The thumbnails in the example image are all of different proportions but the alloted space is 1x1 for all.

    However the documentation on this function is pretty bad! Does anyone know how to do this?
    Last edited by U2XS; December 28th, 2010 at 07:17 AM.
    Go the extra mile! It's Never Crowded!

  2. #2
    Join Date
    Nov 2006
    Location
    Brooklyn, NY
    Beans
    116
    Distro
    Ubuntu

    Re: Enlarge image canvas using ImageMagic

    I found it in the documentation here: http://www.imagemagick.org/Usage/crop/#border

    My code
    Code:
    convert sand.jpg -bordercolor white -border 0x50 sand.jpg
    I still need to read the height/width to determine how much more it needs, but it's a good solution.
    Go the extra mile! It's Never Crowded!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •