Page 1 of 1

convert ignores format option

Posted: 2012-06-09T04:34:41-07:00
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?

Re: convert ignores format option

Posted: 2012-06-09T05:00:58-07:00
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

Re: convert ignores format option

Posted: 2012-06-18T22:24:08-07:00
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).

Re: convert ignores format option

Posted: 2012-06-19T10:05:55-07:00
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.

Re: convert ignores format option

Posted: 2012-06-19T16:54:12-07:00
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?

Re: convert ignores format option

Posted: 2012-06-19T18:34:07-07:00
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?