LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2003, 07:36 AM   #1
wincrk
Member
 
Registered: Feb 2003
Distribution: Redhat 9.0
Posts: 104

Rep: Reputation: 15
converting .bmp to .jpeg


hi, i had heard before that there is an easier way to convert a large number of .bmp picture into .jpg picture . i heard that it is a script. did some one know or own such script that able to do so?
or do someone know where i could get it?... because i am tired to convert it one by one.
 
Old 03-02-2003, 08:02 AM   #2
Q*Bert
Member
 
Registered: Feb 2003
Location: Birmingham, UK
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222

Rep: Reputation: 30
Have a look at the program called 'convert':

man convert

I'm not familiar with it, but it does what you want I think. I think it's part of the ImageMagick set of tools.

Q*Bert
 
Old 03-03-2003, 02:49 PM   #3
jbarratt
LQ Newbie
 
Registered: Mar 2003
Location: Los Angeles, CA
Distribution: RH+Ximian
Posts: 2

Rep: Reputation: 0
Quick bash mini-script to do bulk conversion

I use 'convert' with a simple bash for loop quite a bit to do various tasks.

Code:
for i in *.jpg ; 
do
     convert $i `basename .jpg $i`.gif
done
You can also use this trick to, for example, make thumbnails

Code:
for i in *.jpg ;
do
   convert -size 640x480 $i `basename .jpg $i`-small.jpg
done
 
Old 03-03-2003, 05:05 PM   #4
JStew
Member
 
Registered: Oct 2002
Location: North Atlanta
Distribution: LFS
Posts: 229

Rep: Reputation: 30
the Gimp will do it too...
 
Old 03-03-2003, 05:56 PM   #5
jbarratt
LQ Newbie
 
Registered: Mar 2003
Location: Los Angeles, CA
Distribution: RH+Ximian
Posts: 2

Rep: Reputation: 0
Really? Bulk conversion? How does that work?
 
Old 03-04-2003, 08:21 PM   #6
wincrk
Member
 
Registered: Feb 2003
Distribution: Redhat 9.0
Posts: 104

Original Poster
Rep: Reputation: 15
thanks everyone. actually i am not so good in programming because i used to do everything in windows. i am new to linux.

let say if i have several number (more than 100) of .bmp file and i want to convert it to .jpeg and those .jpeg file will be named like .bmp name. for example if the .bmp name is picme.bmp, then after the conversion, the name is picme.jpeg.
could somebody give me the script to do that?
 
  


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
converting tiff to jpeg freebies Linux - Software 8 06-26-2013 10:17 PM
Image conversor bmp & png to jpeg Adony Linux - Software 2 06-19-2004 03:43 PM
converting JPEG images to MPEG-2 video using <convert>? BeetleBailey Programming 3 06-11-2004 09:07 AM
BMP Charset gamehack Slackware 0 04-26-2004 09:58 AM
Algorithm for bmp to jpeg conversion giriprasad1979 Programming 4 03-01-2004 03:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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