Page 1 of 1
How to configure to always use the BMP3 image format?
Posted: 2014-09-08T16:14:12-07:00
by konstantin
I would like to use the BMP3 image format for .bmp files, becaue I am using Arch linux and "feh" picture viewer which doesn't support BMP4 image format. I read this topic:
viewtopic.php?f=1&t=23875
Which partially solve the problem:
Code: Select all
mogrify -format bmp -define bmp:format=bmp3 test*.png
But I don't want to use always the switch -define, instead of I would like to set this option in some configuration file, if possible.
Which config file should I use and how to achieve this?
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-09T15:45:07-07:00
by snibgo
As far as I know, there is no config file to do that.
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-09T17:07:21-07:00
by fmw42
What version of IM are you using and platform? That define
Code: Select all
mogrify -format bmp -define bmp:format=bmp3 test*.png
is only available in IM 6.8.6.9 or later. If you are on a current version and that fails, then perhaps it "got lost" in some newer release or is a bug?
How do you know that you are not getting BMP3? Did you test with convert rather than mogrify on one image to see if that is importable in your other software?
Neither IM verbose information nor exiftool seem to indicate whether it is BMP3 or BMP4 when I do
So I do not know how to check so I can find out if it works in convert but not in mogrify.
Anyone know how to check the type of BMP?
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-09T17:12:36-07:00
by fmw42
Here is perhaps an alternate way from
http://www.imagemagick.org/Usage/formats/#bmp:
" However, if a PNG input file was used and it contains a gAMA and cHRM chunk
(gamma and chromaticity information) either of which forces "convert" to
write a BMP4. To get a BMP3 you need to get rid of that information. One way
may be to pipeline the image though a minimal 'image data only' image file
format like PPM and then re-save as BMP3. Messy, but it should work."
convert image.png ppm:- | convert - BMP3:image.bmp
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-09T17:40:29-07:00
by snibgo
I think konstantin is saying that "-define bmp:format=bmp3" works, but he doesn't want to keep typing it. He wants this to be the default (for BMP outputs).
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-09T18:20:05-07:00
by fmw42
snibgo wrote:I think konstantin is saying that "-define bmp:format=bmp3" works, but he doesn't want to keep typing it. He wants this to be the default (for BMP outputs).
Thanks for the correction. But I do not think IM will go backwards for its default.
I do not think there is any config parameter now, but perhaps it can be done in the delegates.xml file. I really do not know. One of the IM developers would need to answer this question.
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-10T07:25:40-07:00
by glennrp
You could write a little script and put it in your $PATH, e.g.,
Code: Select all
#!/bin/sh
# tobmp3 [files]
mogrify -format bmp -define bmp:format=bmp3 $*
Then just run "tobmp3 *.png"
Re: How to configure to always use the BMP3 image format?
Posted: 2014-09-10T19:51:23-07:00
by konstantin
snibgo wrote:I think konstantin is saying that "-define bmp:format=bmp3" works, but he doesn't want to keep typing it. He wants this to be the default (for BMP outputs).
Yes.