Error 'Maximum TIFF file size exceeded` with -extract command

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
briligg
Posts: 32
Joined: 2018-05-28T15:31:02-07:00
Authentication code: 1152

Error 'Maximum TIFF file size exceeded` with -extract command

Post by briligg »

The libtiff5 library is installed, and the Resource limits are all adjusted to be large enough, but when i run

Code: Select all

convert FileIn.tif -extract 4000x4000+44080+21040 FileOut.tif
I get

Code: Select all

convert-im6.q16: Maximum TIFF file size exceeded. `TIFFAppendToStrip' @ error/tiff.c/TIFFErrors/564.
It converted to a TIFF of much larger dimensions yesterday without problems. Do I have a syntax error or something?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by snibgo »

Yes. See http://www.imagemagick.org/script/comma ... hp#extract . "-extract" is an option that is used before reading an image, not an operation for an image that has already been read.
snibgo's IM pages: im.snibgo.com
briligg
Posts: 32
Joined: 2018-05-28T15:31:02-07:00
Authentication code: 1152

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by briligg »

When I tried to copy the syntax in the example, IM couldn't read my file names.

Code: Select all

convert -extract 4000x4000+44080+21040 \ Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.tif LOLA-Center.tif
convert-im6.q16: unable to open image ` Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014.tif': No such file or directory @ error/blob.c/OpenBlob/2701.
convert-im6.q16: no images defined `LOLA-Center.tif' @ error/convert.c/ConvertImageCommand/3258.
briligg
Posts: 32
Joined: 2018-05-28T15:31:02-07:00
Authentication code: 1152

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by briligg »

Oh wait, is there really supposed to be a quotation mark after the output file name?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by snibgo »

You have an isolated backslash "\" where IM expects an input filename.
snibgo's IM pages: im.snibgo.com
briligg
Posts: 32
Joined: 2018-05-28T15:31:02-07:00
Authentication code: 1152

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by briligg »

Okay. I'm not used to conventions in code examples - there was a backslash in the example, and it didn't seem to me to be any kind of labelling convention, so i included it. I'll fix that, thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by fmw42 »

alternates are:

Code: Select all

convert FileIn.tif[4000x4000+44080+21040] FileOut.tif
or

Code: Select all

convert FileIn.tif -crop 4000x4000+44080+21040 +repage  FileOut.tif
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by snibgo »

At http://www.imagemagick.org/script/comma ... hp#extract , the backslash is the Unix character meaning that the command is continued on the next line.

Those examples also have a stray double-quote after the output name, and a comma. @Fred: can the quotes and comma be removed, please?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error 'Maximum TIFF file size exceeded` with -extract command

Post by fmw42 »

snibgo wrote:@Fred: can the quotes and comma be removed, please?

I will add this to my list of documentation edits and try to get to it later this week.
Post Reply