convert ignores format option

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Tanger
Posts: 7
Joined: 2011-05-23T10:29:05-07:00
Authentication code: 8675308

convert ignores format option

Post by Tanger »

$ convert -verbose image.gif -format JPEG image.fmt
image.gif GIF 4910x3960 4910x3960+0+0 8-bit PseudoClass 256c 2.209MB 0.350u 0:00.360
image.gif=>image.shit GIF 4910x3960 4910x3960+0+0 8-bit PseudoClass 256c 2.208MB 0.280u 0:00.280
$ file image.fmt
image.shit: GIF image data, version 89a, 4910 x 3960

Is it a bug?

$ convert -version
Version: ImageMagick 6.7.7-5 2012-06-09 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

OS: gentoo. USE flags: (X autotrace bzip2 corefonts cxx djvu fontconfig gs jpeg jpeg2k openmp png svg tiff truetype zlib -fftw -fpx -graphviz -hdri -jbig -lcms -lqr -lzma -opencl -openexr -pango -perl -q32 -q64 -q8 -raw -static-libs -test -webp -wmf -xml)

Thanks.


UPD: Oops. Perhaps I misunderstood what this option matter. Sorry.
Is there a way to manualy specify format of the output file?
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: convert ignores format option

Post by glennrp »

  • file image.gif
    gif: GIF image data, version 89a, 70 x 46
    convert image.gif JPEG:image.fmt
    file image.fmt:
    JPEG image data, JFIF standard 1.01
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert ignores format option

Post by anthony »

-format has two variants.

in mogrify it means output image file format
in convert it means 'format' for the -identify option or "info:" coder.

In other words it isn't 'ignored', just saved (as a setting) for a different use.

The -format option will however be a problem, as eventually these two commands will be merged into the new IMv7 command "magick".

Any suggestions on how these two different option meanings should be modified to work in the same command?

Suggested option names as a replacement for one of the option meanings
-fmt
-image-format
-output-format

Now is the time for your say -- I really have no preference.

NOTE: in mogrify -format also goes with -path (which has no meaning, and thus no conflict in convert).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert ignores format option

Post by fmw42 »

Personally, I would rather you change the mogrify "-format" to say "-output" or "-output-format", rather than change the identify/convert -format. I use the latter much more in my scripts than the former. Also I think it would help mogrify users to know really that it defining the output (format), since in the mogrify structure the output is specified before the input.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert ignores format option

Post by anthony »

fmw42 wrote:Personally, I would rather you change the mogrify "-format" to say "-output" or "-output-format", rather than change the identify/convert -format.
What about -path. should that become -output-path to match?

I would like to see this setting become usable in "magick" for control of the location of -write and the final implied write (beyond normal filename escapes).


Anyone else have a view?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert ignores format option

Post by fmw42 »

anthony wrote:
fmw42 wrote:Personally, I would rather you change the mogrify "-format" to say "-output" or "-output-format", rather than change the identify/convert -format.
What about -path. should that become -output-path to match?

I would like to see this setting become usable in "magick" for control of the location of -write and the final implied write (beyond normal filename escapes).


Anyone else have a view?

If you think -output-format is good, then I have no objections to using -output-path. It makes things clearer in mogrify.

I am not sure what you mean by "control of the location of -write and the final implied write? Is this with regard to mogrify or convert or the "combined"? magick command?
Post Reply