Tiny Core Linux

Tiny Core Extensions => TCE Tips & Tricks => Topic started by: Pats on February 27, 2013, 05:43:05 AM

Title: Converting PNG files into JPG format ?
Post by: Pats on February 27, 2013, 05:43:05 AM
I want to convert all the PNG graphic files in a directory named 'Graphics' into JPG format, with the same file-names except the file-extension.
Presently I am doing it using GIMP2 one file at a time, with all the default parameters. GIMP first export the PNG file into some  Colour table and then convert the file into JPG format.

I think there is some  command - 'convert' or something which may be doing the job. What is the exact command and which extension is needed to convert all the files in one-go ? An example command will be highly appriciated .

~ Pats
Title: Re: Converting PNG files into JPG format ?
Post by: Juanito on February 27, 2013, 05:46:45 AM
I suspect one of the tools supplied with ghostscript, poppler-bin, tiff-bin, etc will do this
Title: Re: Converting PNG files into JPG format ?
Post by: bmarkus on February 27, 2013, 05:57:57 AM
Install ImageMagick and use this command:

Code: [Select]
convert file.png file.jpg
or install GraphicsMagick and use command

Code: [Select]
gm convert file.png file.jpg
You can use wild cards.

With additional parameters you can fine tunes conversion compression, size, etc. Note jpg formet doesn't support transparency while png do, so you can loose some features with jpg.
Title: Re: Converting PNG files into JPG format ?
Post by: Pats on February 27, 2013, 07:00:30 AM
Thnks bmarkus,

It helped .
My graphic files are just line and graphs, so other parameters are not needed,anyhow.

Extremely sorry, I was in such a hurry to complete the job within given deadline, that I forgot to search the net.
Many-many thanks.

~ Pats
Title: Re: Converting PNG files into JPG format ?
Post by: bmarkus on February 27, 2013, 07:13:46 AM
Pats,

no problem, glad to hear it worked for you :)
Title: [SOLVED} Re: Converting PNG files into JPG format ?
Post by: Pats on June 17, 2013, 10:38:10 PM
Thnks.