Convert JPEG to BMP
-
- Posts: 5
- Joined: 2016-01-13T13:08:13-07:00
- Authentication code: 1151
Convert JPEG to BMP
Just installed Imagemagick. I am trying to convert JPEG images from JPG extensions to BMP extensions. I have tried just a plain convert. But that didn't display in a ooREXX dialog I have. I thought I needed to resize the image but I can't get CONVERT to accept the parameter. I have tried it many ways but can't figure it out. For example, I tried:
CONVERT -size 300x450! tt0303714.JPG tt0303714.BMP
Which gave me the error:
Invalid Parameter - 300x450!
Must me something simple I am missing but I can't find it. Any help would be appreciated.
CONVERT -size 300x450! tt0303714.JPG tt0303714.BMP
Which gave me the error:
Invalid Parameter - 300x450!
Must me something simple I am missing but I can't find it. Any help would be appreciated.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert JPEG to BMP
A jpg file contains metadata, including its size, so the "-size" option is redundant.
The size option takes two integers with "x" between them. No "!".
The size option takes two integers with "x" between them. No "!".
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert JPEG to BMP
If you want to resize, then use
-size is for creating new files.
Code: Select all
convert tt0303714.JPG -resize WxH tt0303714.BMP
Re: Convert JPEG to BMP
First make sure you're really running ImageMagick's "convert" and if so, what version:
Type or
to find out.
Type
Code: Select all
convert -version
Code: Select all
convert | head -2
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert JPEG to BMP
Well spotted, Glenn. "Invalid Parameter" is an error message from the Microsoft "convert" program, not ImageMagick.
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2016-01-13T13:08:13-07:00
- Authentication code: 1151
Re: Convert JPEG to BMP
The response to:
CONVERT - verison
is:
Version: ImageMagick 6.9.2-0 Q16 x64 2015-08-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
CONVERT - verison
is:
Version: ImageMagick 6.9.2-0 Q16 x64 2015-08-15 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
-
- Posts: 5
- Joined: 2016-01-13T13:08:13-07:00
- Authentication code: 1151
Re: Convert JPEG to BMP
I also tried it with the -resize parameter. I have a button in the dialog that I want to fill to the outside edge. That is why I tried -size and -resize.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert JPEG to BMP
Have you really an x between WxH? Check or retype it. What is the command again and what is the error? Is -resize WxH after the input image?
-
- Posts: 5
- Joined: 2016-01-13T13:08:13-07:00
- Authentication code: 1151
Re: Convert JPEG to BMP
I tried it again with the command:
CONVERT tt0303714.JPG -resize 300x450 tt0303714.BMP
and received error:
Invalid Parameter - -resize
CONVERT tt0303714.JPG -resize 300x450 tt0303714.BMP
and received error:
Invalid Parameter - -resize
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert JPEG to BMP
I am surprised the following works. The hyphen should be next to -version and it is spelled wrong.
Try
I would agree with the others that somehow you may be running the Windows convert and not the IM convert.
Code: Select all
CONVERT - verison
Code: Select all
convert -version
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Convert JPEG to BMP
That would be an error message from the Windows convert command. See if you have the IM convert command somewhere in your path by typing this at the command line...oorexxpert wrote:Invalid Parameter - -resize
Code: Select all
where convert
-
- Posts: 5
- Joined: 2016-01-13T13:08:13-07:00
- Authentication code: 1151
Re: Convert JPEG to BMP
Well, I'm back. I had to leave for a while, sorry. I have tried a simple example where no resizing was involved. I issued the following:
C:\Users\John\My Documents\IMDB\POSTERS>"c:\program files\imagemagick-6.9.2-q16\convert.exe" tt0024124.jpg tt0024124.bmp
C:\Users\John\My Documents\IMDB\POSTERS>
It seemed to work. However, when I tried to display in in an ooREXX dialog with an ADDBITMAPBUTTON statement, nothing appeared. However, when I edited the JPG file with PAINT and saved it, unaltered, as a BMP file, it displayed correctly. There is obviously something that CONVERT does differently PAINT. I could use PAINT but I have around 1500 images to convert and using a program rather than PAINT would be a lot quicker.
John
C:\Users\John\My Documents\IMDB\POSTERS>"c:\program files\imagemagick-6.9.2-q16\convert.exe" tt0024124.jpg tt0024124.bmp
C:\Users\John\My Documents\IMDB\POSTERS>
It seemed to work. However, when I tried to display in in an ooREXX dialog with an ADDBITMAPBUTTON statement, nothing appeared. However, when I edited the JPG file with PAINT and saved it, unaltered, as a BMP file, it displayed correctly. There is obviously something that CONVERT does differently PAINT. I could use PAINT but I have around 1500 images to convert and using a program rather than PAINT would be a lot quicker.
John
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert JPEG to BMP
There are several forms of BMP. Your other program may want one of the older forms. So try BMP3:tt0024124.bmp or BMP2:tt0024124.bmp for the output image and see if that works. For mass conversion, see mogrify http://www.imagemagick.org/Usage/basics/#mogrify, though I am not sure without testing, how to specify the BMP3: or BMP2: in mogrify.
see
http://www.imagemagick.org/Usage/formats/#bmp
see
http://www.imagemagick.org/Usage/formats/#bmp