Re: [Linuxcommand-discuss] Resizing multiple images using Terminal
Brought to you by:
bshotts
|
From: Ania <pi...@gm...> - 2011-09-18 12:52:45
|
It seems that I always find a solution right after posting a question to
a forum, so hopefully it will happen again this time ;)
I figured out how to scale images and read their dimensions, and now I
only have to rename the batch so that it can appear as a sequence in the
movie.
I successfuly changed file extensions from uppercase to lowercase, and
looks like I'm almost there... I wrote this command line:
rename -n -v 's/(\d{8})\.jpg$/new_file_name_$1\.jpg' *.jpg
to rename photos with 8-digit names (they are like "DSC_5889.jpg") to
sequence name followed by a number. I don't know if this 8-digit rule is
necessary if I want to rename all of them? Anyway, the answer was:
Substitution replacement not terminated at (eval 1) line 1.
I suppose that this command is correct as it worked with changing the
extension so maybe there is something wrong with this 8-digit rule?
Regards,
Ania
On 09/18/2011 11:40 AM, Ania wrote:
> Hello,
> this is my first experience with Terminal so I am a complete newbie :)
> but I need it to process multiple images which are to be used later in
> a video.
> The first thing that I wanted to do was to minify the images of one
> sequence. I keep images for each sequence in separate folders. To make
> sure that the scaling will be proportional, I divided the original
> size by four and scaled first one of them with Gimp. These are the
> image dimensions:
> Width: 2592 Height: 3872
> And four times smaller:
> Width: 648 Height: 968
> The target image should have height 480 because the video will be
> 720x480, but I didn't know how to write a command to change only
> height and adjust width proportionally, so to avoid distorting them I
> separated vertical images from horizontal in different folders. When
> the images are close to the target size I want to crop them (not sure
> how to do it yet).
> I wrote this command line:
> mogrify -convert -size 648x968 *.jpg -resize 648x968
> And the answer was:
> mogrify: unrecognized option `-convert' @
> error/mogrify.c/MogrifyImageCommand/4560.
>
> What am I doing wrong?
>
|