[SOLVED] Batch resize : first photo wrong

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?".
Post Reply
cotcot

[SOLVED] Batch resize : first photo wrong

Post by cotcot »

Today I discovered that I could much easier do with ImageMagick what I am doing normally with Gimp : resize photos of mixed formats to 1 format keeping the aspect ratio and filling the borders with black. Goal is to have the photos ready for making a slide show in a video editor (blender). I am working in linux (ubuntu jaunty). The command I use is :

Code: Select all

convert *.JPG -resize 1920x1080 -extent 1920x1080 -background black -gravity center videoimg*.PNG

Doing this on a batch works fine except for the first foto. There the border color is not black and is only right instead of centered. As such it is not a big problem (matter of having a dummy for the first photo)

Any idea of the reason ?
Thanks
Last edited by cotcot on 2009-08-02T22:43:04-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch resize : first photo wrong

Post by fmw42 »

put the settings of -background black -gravity center right after your *.jpg so that the options see them before operating.

convert *.JPG -gravity center -resize 1920x1080 -background black -extent 1920x1080 videoimg*.PNG

see

http://www.imagemagick.org/Usage/basics/#cmdline
cotcot

Re: [SOLVED] Batch resize : first photo wrong

Post by cotcot »

Thanks for the solution and the link. Problems is solved.
Post Reply