bmp to jpg (or any format to jpg)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jopsh1

bmp to jpg (or any format to jpg)

Post by jopsh1 »

I am trying to convert bmp to jpg (Red Hat Linux operating system)by:

convert 1234.bmp 1234.jpg

It seems converting, but the resulting 1234.jpg file is the same size as the 1234.bmp and when I do a diff on the files, there is no difference at all. It basically didn't convert to jpg, but just created another copy of the same file with extension jpg. I opened the 1234.jpg file in vi editor and the file header still shows it as BMP, not jpg.

Could anyone help me to convert to jpg?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: bmp to jpg (or any format to jpg)

Post by magick »

Perhaps your version of ImageMagick does not include JPEG support. Type
  • convert -list format
Look for the JPEG tag. Does it have a mode of rw-?
jopsh1

Re: bmp to jpg (or any format to jpg)

Post by jopsh1 »

Thanks for the reply.

JPEG is not in the list when I list the formats. I checked the version I have and it is 6.4.6-6
What version has jpeg support?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: bmp to jpg (or any format to jpg)

Post by magick »

All versions of ImageMagick have JPEG support if you have JPEG installed on your system including the headers. First install the JPEG and JPEG development RPMS. Next, rebuild and reinstall ImageMagick. Check the last few lines of the output from the configure script and verify JPEG has been validated. If not, check config.log to determine why the JPEG delegate library did not validate. Fix the problem and try the configure script again.
jopsh1

Re: bmp to jpg (or any format to jpg)

Post by jopsh1 »

magick wrote:All versions of ImageMagick have JPEG support if you have JPEG installed on your system including the headers. First install the JPEG and JPEG development RPMS. Next, rebuild and reinstall ImageMagick. Check the last few lines of the output from the configure script and verify JPEG has been validated. If not, check config.log to determine why the JPEG delegate library did not validate. Fix the problem and try the configure script again.
Where can I find the JPEG RPM and JPEG develop RPM? I downloaded and installed the jpegsrc.v6b, is this the jpeg and jpeg development rpms? The config.log file says:

some lines from the config.log file
---------------------------------
jpeglib.h No such file or directory
canot find -ljpeg
ac_cv_header_jpeglib_h=no

The operating system is Red Hat enterprise linux 4.

What am I doing wrong?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: bmp to jpg (or any format to jpg)

Post by magick »

Depending on your system you can install the JPEG development RPM like this:
  • yum install jpeg-devel
or
  • up2date jpeg-devel
If you build JPEG from the source distribution you need to install it, ensure there are no permission problems, and point the ImageMagick configure script to its location (e.g. /usr/local/). See http://www.imagemagick.org/script/advan ... lation.php.
Post Reply