ERR outputting TIFF to JPG on fd:1 in script mode IM7

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
chrisedwards
Posts: 5
Joined: 2014-09-22T02:48:01-07:00
Authentication code: 6789

ERR outputting TIFF to JPG on fd:1 in script mode IM7

Post by chrisedwards »

Good morning,

Executing the following:

Code: Select all

magick.exe -script -
Running:

Code: Select all

-read "test.tif"[0]

Code: Select all

-format "jpeg" -define jpeg:dct-method=float -format "jpeg" -resize "196x196^" -gravity "center" -crop "196x196+0+0" +repage -quality 80 -strip -write fd:1
Produces the following error:

Code: Select all

II*     TIFFAppendToStrip: Maximum TIFF file size exceeded.
magick.exe: Maximum TIFF file size exceeded. `TIFFAppendToStrip' @ error/tiff.c/TIFFErrors/560.
magick.exe: Error flushing data before directory write. `TIFFWriteDirectorySec' @ error/tiff.c/TIFFErrors/560.
Running the same command with -write to a normal file does not produce the error. Output should be around 10kb, works find when input is JPG or PSD.

Windows 8.1 x64 Q16 standard build options - source from about a week ago.
chrisedwards
Posts: 5
Joined: 2014-09-22T02:48:01-07:00
Authentication code: 6789

Re: ERR outputting TIFF to JPG on fd:1 in script mode IM7

Post by chrisedwards »

If I specify

Code: Select all

-write jpeg:fd:1
It works fine. I was very much misinterpreting what "-format" does for magick (I was thinking mogrify usage).

Is there a way to set format beforehand with magick/convert without specifying it at output?

This isn't a bug.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: ERR outputting TIFF to JPG on fd:1 in script mode IM7

Post by snibgo »

In "convert", "-format" specifies the content of text output.

The output type is specified by an extension or prefix. If neither is given, the type is taken from the input file.

[Mod note: I'm moving this to Users.]
snibgo's IM pages: im.snibgo.com
Post Reply