LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-15-2014, 10:46 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,285

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Graphics Scripting question


I want to be able to bulk process some images by any OSS tool The images are filled forms photographed on both sides, and get processed rather poorly by my printer. What I want to do is:
1. Rotate by 90 degrees
2. Ideally, trim off the darker outer border.
3. Increase brightness - 40% worked for my test sample, but I can adjust the exact number for each batch.
4. Increase contrast - 55% worked for my test sample. The figures will be different on the batch, but they will be constant.
5. Save elsewhere.
6. Print them dual sided. I don't really expect to automate this.

There could be up to 150 of these to do. Any scripting for gimp or ImageMagick seems to mean learning a new language, which takes as long as doing it by hand.

Any suggestions?

Last edited by business_kid; 10-15-2014 at 10:48 AM.
 
Old 10-15-2014, 11:07 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Have a look at ImageMagick which is a command line image processor, if it can be done to an image, imagemagick can do probably do it.

eg:
Code:
convert "/media/LinuxData/Development/Projects/ImageMagickUtilities/100-0138.jpg"  -brightness-contrast 22x0 /tmp/x.jpg
 
Old 10-15-2014, 01:25 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by business_kid View Post
Any scripting for gimp or ImageMagick seems to mean learning a new language, which takes as long as doing it by hand.
i care to disagree.
take a look at http://www.imagemagick.org/script/co...ne-options.php and hack yourself what you need. i don't see any faster way.
then you just wrap it in a shell script like this:
Code:
for i in *jpg ; do convert -<options> "$i" "${i}converted.jpg" ; done
done. i don't see any faster way.

Last edited by ondoho; 10-15-2014 at 01:26 PM.
 
Old 10-16-2014, 01:41 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,285

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Well, it took more time than I wanted to give it, but it is sorted.

Warning to others: ImageMagick-6.x is different from most of the guides out online done for previous versions. Try the installed documentation first. I tried it last :-/.
 
  


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
scripting question bino25 Linux - General 1 03-01-2012 08:56 AM
Scripting question kaplan71 Linux - Software 3 04-13-2010 10:59 AM
scripting question... Basslord1124 Linux - Networking 2 11-09-2005 05:52 AM
Scripting question buster_balz Linux - General 8 05-18-2005 03:30 PM
New to Scripting question s&j Linux - General 2 06-25-2002 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:46 PM.

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