LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-20-2006, 09:33 AM   #1
zeltak
Member
 
Registered: Feb 2006
Distribution: kubuntu dapper
Posts: 61

Rep: Reputation: 15
looking for a way to batch convert 128X128 pngs into other sizes (96,22 etc..)!


Hi guys

i have loads of cool mimetypes i made/downloaded in 128X128 size format. i want to use the in kubuntu and am looking for a way/program to batch convert each png which is in 128X128 into the same png image but in different sized (96,72,56,22 etc..) does anyone know how to do this?

thx alot in advance

Zeltak
 
Old 11-20-2006, 09:37 AM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
http://acherondevelopment.com/project.php?name=birt
 
Old 11-20-2006, 10:03 AM   #3
zeltak
Member
 
Registered: Feb 2006
Distribution: kubuntu dapper
Posts: 61

Original Poster
Rep: Reputation: 15
cool!

does anyone know where i can get a .deb file for this? i dont know how to compile and it isnt in apt-get?

thx

Zeltak
 
Old 11-20-2006, 11:51 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
ImageMagick also does this, and there is a deb for that.
 
Old 11-20-2006, 12:47 PM   #5
m0rg
Member
 
Registered: Jun 2003
Location: France
Distribution: slackware 11.0
Posts: 80

Rep: Reputation: 15
You can use convert in some shell scipt.

convert is part of ImageMagick and is probably installed on your distribution.

You can just read the man page to see how it works (man convert) but IIRC this should be like this:

convert input.png -s widthxheight output.png

This tool can also convert to other image formats like this (to build jpg):

convert input.png -s widthxheight output.jpg
 
Old 11-20-2006, 04:18 PM   #6
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
that would do one .png at a time, birt will do entire directories at once.

it may be in the repo's. do an apt-get install birt and see what happens.
 
Old 11-20-2006, 04:36 PM   #7
kmasaryk
LQ Newbie
 
Registered: May 2004
Distribution: Ubuntu, RHEL, OS X
Posts: 23

Rep: Reputation: 15
Check out mogrify which is also part of Image Magick but, unlike convert, it will overwrite the original file. It can easily do whole directories at a time if you want to overwrite the originals. Otherwise, you'll need to put mogrify or convert in a simple script if you want different versions/sizes of the same original file.
 
Old 11-20-2006, 04:38 PM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Quote:
Originally Posted by rshaw
that would do one .png at a time, birt will do entire directories at once.

it may be in the repo's. do an apt-get install birt and see what happens.
That's the beauty of the command line... if you can do something once, you can do it thousands of times without much more effort...
Code:
$ cd /dir/with/images
$ mkdir smaller
$ for file in *.png; do convert "$f" -s 64x64 "smaller/$f"; done
Note I don't know if that is the proper syntax for convert, I'm just going on the previous comments.
 
  


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
DISCUSSION: Batch convert MPEG files to AVI Steel_J LinuxAnswers Discussion 5 08-14-2013 05:40 AM
How to batch-convert pagesize Letter->A4 in OpenOffice.org 2.0 ? Yalla-One Linux - Software 0 04-18-2006 02:28 AM
Need help doing batch-convert with Gimp paulsm4 Linux - Software 0 01-09-2006 02:11 AM
Batch convert video files KimVette Linux - General 1 08-02-2005 10:13 PM
mp3 batch convert, remote from command line zerodot Linux - Networking 1 02-12-2003 06:08 AM

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

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