Convert .PNM to .JPG--SOLVED

Questions about applications and software
Forum rules
Before you post please read how to get help
User avatar
g0lrk
Level 3
Level 3
Posts: 122
Joined: Wed Jun 27, 2007 10:43 am
Location: A tiny planet somewhere!

Convert .PNM to .JPG--SOLVED

Postby g0lrk » Wed Feb 20, 2008 8:55 am

Hi, got about 25 .PNM's I want to convert to .JPG's & I'm lazy and don't really want to do them one at a time, is there anything that will do them all as a batch?
I know lazy so & so but that's what 'pewter's are for isn't it?
Thank-you in advance.
Kevin.
Last edited by g0lrk on Thu Feb 21, 2008 10:04 am, edited 1 time in total.

User avatar
Slocker
Level 2
Level 2
Posts: 72
Joined: Thu Nov 01, 2007 2:14 pm
Location: Madrid, Spain
Contact:

Re: Convert .PNM to .JPG

Postby Slocker » Wed Feb 20, 2008 11:53 am

Put all of them in a folder, open a terminal and write

Code: Select all

convert * name.jpg

And it would create a series of image with the name you gave, plus a number, like name-0.jpg, name-1.jpg,... If you don't have 'convert' command, install ImageMagick from Software Portal or by writting on a terminal:

Code: Select all

sudo apt-get install imagemagick
Alex Slocker

User avatar
g0lrk
Level 3
Level 3
Posts: 122
Joined: Wed Jun 27, 2007 10:43 am
Location: A tiny planet somewhere!

Re: Convert .PNM to .JPG

Postby g0lrk » Thu Feb 21, 2008 9:02 am

Well I must be doing something wrong as when I type what you said, after installing imagemagick, it keeps reporting an error!
bash: syntax error near unexpected token `convert'

Any ideas where I've gone wrong please?
Cheers.
Kevin.

User avatar
Slocker
Level 2
Level 2
Posts: 72
Joined: Thu Nov 01, 2007 2:14 pm
Location: Madrid, Spain
Contact:

Re: Convert .PNM to .JPG

Postby Slocker » Thu Feb 21, 2008 9:15 am

Silly me! I've forgotten the './', it would be:

Code: Select all

convert ./* name.jpg
Alex Slocker

User avatar
g0lrk
Level 3
Level 3
Posts: 122
Joined: Wed Jun 27, 2007 10:43 am
Location: A tiny planet somewhere!

Re: Convert .PNM to .JPG--SOLVED

Postby g0lrk » Thu Feb 21, 2008 10:03 am

Thanks Slocker that's sorted it, all done now, many thanks indeed.
Have saved that command in a text file in the Docs folder so I know how to do that if the need arises again.
Cheers.
Mint Forum to the rescue once more!
Kevin.

User avatar
Slocker
Level 2
Level 2
Posts: 72
Joined: Thu Nov 01, 2007 2:14 pm
Location: Madrid, Spain
Contact:

Re: Convert .PNM to .JPG--SOLVED

Postby Slocker » Thu Feb 21, 2008 10:40 am

If you need to do it repeatedly you may try nautilus-actions.

Code: Select all

sudo apt-get install nautilus-actions

And in the then configure an action like 'Convert to JPG', and then, just by right-click on an image, it'll show an option to convert it. Just dig around and try to configure, because it's simple. Nevertheless you can come here in order to have your problems worked out ;).
Alex Slocker


Return to “Software & Applications”

Who is online

Users browsing this forum: jimallyn and 2 guests