LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2013, 04:14 AM   #1
rmcknight
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
working example to create a small archive of your photos using convert (imagemagick)


First create a duplicate folder for your archive based on your orig structure (with no files).
For me /data/all_photos is where the big originals are, and i want copy put in /data/small

Code:
cd /data/all_photos
rsync -av -f"+ */" -f"- *" . /data/small
then, put this is a nice bash script (called rgm) in location say /data
{replace *123*.JPG with * or whatever you want}

Code:
while read file
do
oufile="${file:2}"
  convert -monitor -resize 1024x1024 "$file" "/data/small/${oufile}"
done < <(find . -name \*123*.JPG)
then
just run your command with
Code:
/data/rgm
{make sure your pwd is your photo root folder - for me /data/all_photos}

if you need convert, then get it using
Code:
sudo apt-get install imagemagick --fix-missing

Last edited by rmcknight; 05-04-2013 at 04:59 AM. Reason: added code tags
 
Old 05-04-2013, 04:52 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Hi and welcome to LQ.

Thanks for the howto. Can you please wrap your code with the code tags? It will make it so much more readable. Thanks

Last edited by sycamorex; 05-04-2013 at 04:52 AM. Reason: Forgot about the ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageMagick convert and eps Daravon Linux - Software 7 02-16-2012 04:06 PM
[SOLVED] Using convert from imagemagick package to convert multiple jpg files janis_169 Linux - Newbie 5 07-18-2010 04:22 PM
ImageMagick-Convert, resize width, keep aspect cadj Linux - Software 2 06-18-2010 05:10 PM
ImageMagick - convert cornish Linux - Software 3 06-13-2006 08:26 AM
where would I find ImageMagick's convert program? kuplo Linux - Software 1 01-12-2006 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration