Script for resize canvas size and aling image in center of canvas

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Dormi
Posts: 3
Joined: 2015-01-26T03:54:37-07:00
Authentication code: 6789

Script for resize canvas size and aling image in center of canvas

Post by Dormi »

Greetings,

I'm using ImageMagick in Windows

I need a script to do the following for batch files:
1)resizing canvas size height to some varrible
2)and center aligning image in this new canvas

Well, I am new in ImageMagick scripting

Please, help me

Thanks a lot
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Script for resize canvas size and aling image in center of canvas

Post by snibgo »

I don't understand what you want to do. "-resize" will resize an image, but then there is no question of centering it.
snibgo's IM pages: im.snibgo.com
Dormi
Posts: 3
Joined: 2015-01-26T03:54:37-07:00
Authentication code: 6789

Re: Script for resize canvas size and aling image in center of canvas

Post by Dormi »

i need to resize canvas, not image
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Script for resize canvas size and aling image in center of canvas

Post by Bonzo »

You need to explain further; I recommend you post a graphical example of what you want.

-extent can increase canvas size and -gravity center will center the image on the background.

-size will create a canvas
Dormi
Posts: 3
Joined: 2015-01-26T03:54:37-07:00
Authentication code: 6789

Re: Script for resize canvas size and aling image in center of canvas

Post by Dormi »

Bonzo wrote:You need to explain further; I recommend you post a graphical example of what you want.

-extent can increase canvas size and -gravity center will center the image on the background.

-size will create a canvas
thank you for help. This command save a lot of my time
Post Reply