WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Converting PNG files into JPG format ?  (Read 6339 times)

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Converting PNG files into JPG format ?
« on: February 27, 2013, 02: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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Converting PNG files into JPG format ?
« Reply #1 on: February 27, 2013, 02:46:45 AM »
I suspect one of the tools supplied with ghostscript, poppler-bin, tiff-bin, etc will do this

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Converting PNG files into JPG format ?
« Reply #2 on: February 27, 2013, 02: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.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: Converting PNG files into JPG format ?
« Reply #3 on: February 27, 2013, 04: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

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Converting PNG files into JPG format ?
« Reply #4 on: February 27, 2013, 04:13:46 AM »
Pats,

no problem, glad to hear it worked for you :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
[SOLVED} Re: Converting PNG files into JPG format ?
« Reply #5 on: June 17, 2013, 07:38:10 PM »
Thnks.