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 03-01-2020, 04:48 AM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
scripting gimp


Hi!

gf has about 500 photos of book covers. They all need to be shrunk to fit in a transparent background of 240 by 240 pixels.

So, I would create a new file 240 x 240 pixels then get the pictures and shrink them proportionally so the height or width, whichever is greater is say 230px, then get them in the transparent background.

I have never tried to automate gimp. Don't know what kind of script gimp can use.

Any tips, good links, please?

I can do small things with Python. Maybe Python could do this?
 
Old 03-01-2020, 06:44 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
https://www.howtogeek.com/109369/how...inux-terminal/
 
1 members found this post helpful.
Old 03-01-2020, 08:09 AM   #3
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,628

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557
Can definitely be done with ImageMagick or GraphicsMagick - which, although were originally the same software, have now diverged in potentially significant ways.

For example, GM can process images faster, but fails to handle some JPEG images that IM can handle.

There are various IM thumbnail examples here, including adding transparent padding: http://www.imagemagick.org/Usage/thumbnails/#pad
(Be sure to use 24-bit PNG, not GIF, for transparency.)


Also, whilst resizing is simple, you may find you want to experiment to find out what produces the best quality - I once ended up with a process that enlarged an image and applied a slight sharpening effect, before shrinking down to intended size - this mostly produced better thumbnails than a straight resize, (except for simple logos where it made things worse so needed to be disabled).


Last edited by boughtonp; 03-01-2020 at 08:12 AM.
 
1 members found this post helpful.
  


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
SNAP my ssss this installed gimp and gimp no want to work right 2.10 gimp. BW-userx Linux - Software 1 12-07-2018 01:37 PM
LXer: GIMP Painter And GIMP Paint Studio Transform GIMP Into The Ultimate Painting Tool LXer Syndicated Linux News 0 02-08-2011 05:40 PM
gimp / gutenprint prob: gimp does not print bitpicker Linux - Software 0 04-08-2005 07:38 AM
gimp (1.3.21) and gimp-perl - need help installing gimp-perl keex Slackware 0 10-22-2003 03:54 PM
Can I load GIMP in english ? (only gimp) Dark Carnival Linux - Software 4 09-17-2003 05:18 PM

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

All times are GMT -5. The time now is 03:14 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