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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-15-2014, 10:46 AM
|
#1
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,954
|
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.
|
|
|
10-15-2014, 11:07 AM
|
#2
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,190
|
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
|
|
|
10-15-2014, 01:25 PM
|
#3
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by business_kid
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.
|
|
|
10-16-2014, 01:41 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,954
Original Poster
|
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 :-/.
|
|
|
All times are GMT -5. The time now is 12:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|