Page 1 of 1
increasing the height of image not resizing
Posted: 2009-01-30T22:35:47-07:00
by manit
I want to increase the height of image to create blank space at the bottom.What should be the command.Also is there a manual of imagemagick available to see all command line options offline.
Re: increasing the height of image not resizing
Posted: 2009-01-31T11:42:55-07:00
by fmw42
manit wrote:I want to increase the height of image to create blank space at the bottom.What should be the command.Also is there a manual of imagemagick available to see all command line options offline.
see -extent
http://www.imagemagick.org/Usage/crop/#extent
You would have to make a PDF of the page at:
http://www.imagemagick.org/script/comma ... ptions.php
Re: increasing the height of image not resizing
Posted: 2009-02-01T21:33:26-07:00
by anthony
Use
-extent if you know the final size of the image afetr the extra space is added.
However if you just want to add N pixels use
-splice instead.
http://www.imagemagick.org/Usage/crop/#splice
Re: increasing the height of image not resizing
Posted: 2009-02-03T00:21:56-07:00
by manit
Can you tell me the command I should write for windows version of IM to add 30 pixel blank white space at only the bottom of image.
EXAMPLE
i have original image of 640*272 and I want to replace it by 640*302 so that there is 30 pixel empty space at bottom where I can give the title.
Is it also possible to add text to an image at particular position.
Re: increasing the height of image not resizing
Posted: 2009-02-03T11:49:26-07:00
by fmw42
manit wrote:Can you tell me the command I should write for windows version of IM to add 30 pixel blank white space at only the bottom of image.
EXAMPLE
i have original image of 640*272 and I want to replace it by 640*302 so that there is 30 pixel empty space at bottom where I can give the title.
Is it also possible to add text to an image at particular position.
If you want the background white, then
convert yourimage -background white -gravity north -extent 640x302 yourextendedimage
see
http://www.imagemagick.org/Usage/crop/#extent
But if you are going to annotate it, then you are better creating the annotation in an image of size 640x30 and then appending the result.
There are any number of ways to add text to an image or colored background of a given size depending upon how you want the text scaled or if you want to specify the pointsize and/or placement. See label:, caption:, -draw, -annotate at
http://www.imagemagick.org/Usage/text/
Once you do that, then just append the two images top and bottom
convert yourimage yourtextimage -append yourcombinedimage
see
http://www.imagemagick.org/script/comma ... php#append
and
http://www.imagemagick.org/Usage/layers/#append
For DOS/PC users see
http://www.imagemagick.org/Usage/api/#windows
Re: increasing the height of image not resizing
Posted: 2009-02-03T17:27:27-07:00
by anthony
Note that as the above usage example references is for UNIX you need to follow a few rules for use on DOS.
They are rather simple, and explained in Windows DOS Scripting
http://www.imagemagick.org/Usage/api/#windows
Re: increasing the height of image not resizing
Posted: 2009-02-08T23:37:23-07:00
by manit
I gave the following command to add space in image of size 632*254
convert.exe "e:\joker.jpg": -background skyblue -extent 632*300 "e:\joker2.jpg"
convert.exe: unable to open image `e:\joker.jpg:': Invalid argument @ blob.c/OpenBlob/2411.
convert.exe: invalid argument for option `-extent': 632*300 @ convert.c/ConvertImageCommand/1281.
Though the file "joker.jpg" is present in e drive.What is the error in my command.I am using windows version of image magick.
Re: increasing the height of image not resizing
Posted: 2009-02-09T00:39:46-07:00
by anthony
manit wrote:I gave the following command to add space in image of size 632*254
convert.exe "e:\joker.jpg": -background skyblue -extent 632*300 "e:\joker2.jpg"
convert.exe: unable to open image `e:\joker.jpg:': Invalid argument @ blob.c/OpenBlob/2411.
convert.exe: invalid argument for option `-extent': 632*300 @ convert.c/ConvertImageCommand/1281.
Though the file "joker.jpg" is present in e drive.What is the error in my command.I am using windows version of image magick.
You have an extra ':' in the first read, just outside the quotes
Re: increasing the height of image not resizing
Posted: 2009-02-20T06:39:12-07:00
by manit
Thanks to all those who replied.I will soon post the things I have learnt in this thread.
what I have learnt from this forum
Posted: 2009-02-22T19:45:47-07:00
by manit
to write <text> to bottom of image
convert e:\1.jpg -gravity south -annotate 0 "<text>" e:\1.jpg
to add margin at base to 316*328 image of 22 pixel
convert e:\1.jpg -background skyblue -extent 316x350 e:\1.jpg
to add 28 pixel margin at bottom of image
convert e:\2.jpg -gravity south -background skyblue -splice 0x28 e:\2.jpg
Re: increasing the height of image not resizing
Posted: 2009-02-22T20:40:08-07:00
by anthony
or just append a text label regardless of image size.
convert e:\1.jpg -background skyblue label:"<text>" -gravity center -append e:\1.jpg