Results 1 to 8 of 8
Hello guys!
I am currently doing some projects where I have several thousand of pictures downloaded from the internet and I need to standardize their size to 95x86.
Mostly jpg, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-03-2011 #1
Help Resizing Photo Sizes Using Terminal
Hello guys!
I am currently doing some projects where I have several thousand of pictures downloaded from the internet and I need to standardize their size to 95x86.
Mostly jpg, a few are gif format. Different sizes too.
I would appreciate it if someone can share how I can resize them using the terminal. I have some experience resizing movies/videos but as far as pictures, no experience whatsoever.
Thank you in advance for any advises.
Regards,
nujinininujinini
Linux User #489667
- 08-03-2011 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Imagemagick is a console app that should work well for getting the job done:
http://www.imagemagick.org/
ImageMagick: Command-line Tools
It might already be installed on your system, depending which distro you run.oz
- 08-03-2011 #3
ImageMagick: Convert, Edit, Or Compose Bitmap Images can be used for this.
An example looks like this
Of course, there are a lot of options.Code:convert example.gif -resize 95x86 small_example.gif
Knock yourself out
Resize or Scaling -- IM v6 ExamplesYou must always face the curtain with a bow.
- 08-04-2011 #4
Thanks Ozar and Irithori!
ImageMagick doesn't seem to be installed in my jaunty and I'm having a little difficulty getting it as per my output.
Code:jun@jun-laptop:~$ sudo apt-get install imagemagick [sudo] password for jun: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: imagemagick-doc Suggested packages: transfig The following NEW packages will be installed: imagemagick imagemagick-doc 0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded. Need to get 3330kB of archives. After this operation, 21.4MB of additional disk space will be used. Do you want to continue [Y/n]? Y WARNING: The following packages cannot be authenticated! imagemagick imagemagick-doc Install these packages without verification [y/N]? y Err http://security.ubuntu.com jaunty-security/main imagemagick 7:6.4.5.4.dfsg1-1ubuntu3.1 404 Not Found [IP: 91.189.92.166 80] Err http://ph.archive.ubuntu.com jaunty-updates/main imagemagick 7:6.4.5.4.dfsg1-1ubuntu3.1 404 Not Found [IP: 91.189.92.169 80] Err http://ph.archive.ubuntu.com jaunty-updates/main imagemagick-doc 7:6.4.5.4.dfsg1-1ubuntu3.1 404 Not Found [IP: 91.189.92.169 80] Failed to fetch http://ph.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick_6.4.5.4.dfsg1-1ubuntu3.1_i386.deb 404 Not Found [IP: 91.189.92.169 80] Failed to fetch http://ph.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick-doc_6.4.5.4.dfsg1-1ubuntu3.1_all.deb 404 Not Found [IP: 91.189.92.169 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? jun@jun-laptop:~$
nujinini
Linux User #489667
- 08-04-2011 #5forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
I don't know much about jaunty or its repositories, but if the imagemagick package isn't in the repos, you might be able to use the package from one of the other ubuntu releases, or at the very least you should be able to install it from source. You might try googling install imagemagick jaunty for some howto articles where others have installed it.
oz
- 08-04-2011 #6
Thank you Ozar, I think this did it for me. I have it already.
I am trying to convert
and resize them to 95 x 86 and I got about a thousand of these jpegs.Code:Image Type: jpeg (The JPEG image format) Width: 125 pixels Height: 162 pixels
Can someone please share if its possible at all to do it in the CLI using a *jpeg to do everything in one shot? And also to direct the output to another folder?
Just curious, thanks! Well actually I'm hoping it can be done really
nujinini
Linux User #489667
- 08-04-2011 #7forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Look at using mogrify to resize multiple images:
ImageMagick: Command-line Tools: Mogrifyoz
- 08-07-2011 #8
Hi!Code:jun@jun-laptop:~/ImageMagick-6.6.7-10$ mogrify -resize 95x86 '/home/jun/Desktop/Folder/Sub-folder/file.jpg' mogrify: error while loading shared libraries: libMagickCore.so.4: cannot open shared object file: No such file or directory jun@jun-laptop:~/ImageMagick-6.6.7-10$
I tried mogrify but can't seem to get it right. The error says "no such file" but I am quite sure I have the picture in that folder. In fact I dragged it to the terminal.
Maybe something is wrong with my syntax? Would appreciate any help please. Thank you!
regards,
nujinini
EDIT: I got it already. I executed
$ sudo ldconfig /usr/local/lib
A little googling went a long way. I got the tip from this site.
Thank you for your patience!Last edited by nujinini; 08-07-2011 at 05:22 AM. Reason: Added Updates
nujinini
Linux User #489667


Reply With Quote

