LinuxQuestions.org
Help answer threads with 0 replies.
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, 05: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 05:59 AM. Reason: added code tags
 
Old 05-04-2013, 05:52 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
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 05:52 AM. Reason: Forgot about the ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:06 PM
[SOLVED] Using convert from imagemagick package to convert multiple jpg files janis_169 Linux - Newbie 5 07-18-2010 05:22 PM
ImageMagick-Convert, resize width, keep aspect cadj Linux - Software 2 06-18-2010 06:10 PM
ImageMagick - convert cornish Linux - Software 3 06-13-2006 09:26 AM
where would I find ImageMagick's convert program? kuplo Linux - Software 1 01-12-2006 01:00 AM


All times are GMT -5. The time now is 02:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration