Page 1 of 1
No Space for Output Buffer with Convert
Posted: 2008-01-02T09:27:21-07:00
by aneiman
I have a .NET program that calls convert to redact single page TIF files and then joins them together into a multi-page TIF.
A few of the cases have give me the following error when joining the files together:
Code: Select all
convert.exe: D:\Release\Backfile\Redacted\2006___06-0119-011.tif: No space for output buffer. `TIFFWriteBufferSetup'.
The command that cause the problem (shorted for sake of brevity):
Code: Select all
convert "D:\Release\Backfile\Redacted\2006___06-0119-011_00000.tif" "D:\Release\Backfile\Redacted\2006___06-0119-011_00001.tif" "D:\Release\Backfile\Redacted\2006___06-0119-011_00000.tif" ... "D:\Release\Backfile\Redacted\2006___06-0119-011_00057.tif" +matte -compress group4 -limit memory 64 -limit map 128 "D:\Release\Backfile\Redacted\2006___06-0119-011.tif"
Nothing appears to be wrong with the TIF files (i.e. corrupt TIFs).
If any more details are needed, please let me know.
ImageMagick version 6.3.7-3 Q8 (12/15/07)
Windows 2003 Server Enterprise R2
200 GB of free space on hard drive
3GB of RAM
Re: No Space for Output Buffer with Convert
Posted: 2008-01-02T11:26:58-07:00
by magick
Set your memory and map limits to 1 and add -define tiff:rows-per-strip=1 near the beginning of your command line. If that still fails, you will need to post a URL to your images so we can download and reproduce the problem.
Re: No Space for Output Buffer with Convert
Posted: 2008-01-03T05:28:20-07:00
by aneiman
Thanks! I'll give this a try and get back to you on this.
Re: No Space for Output Buffer with Convert
Posted: 2008-01-03T10:32:06-07:00
by aneiman
The suggestion did not fix the problem. I looked closer at the TIF files I'm merging and it looks like the culprit has a different resolution than the rest of the pages.
Code: Select all
identify *.tif
2006___06-0119-011_00000.tif TIFF 2544x3307 2544x3307+0+0 DirectClass 1-bit 19.625kb
2006___06-0119-011_00001.tif[1] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 22.0996kb
2006___06-0119-011_00002.tif[2] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 30.0117kb
2006___06-0119-011_00003.tif[3] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 32.1387kb
2006___06-0119-011_00004.tif[4] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 6.28516kb
2006___06-0119-011_00005.tif[5] TIFF 14800x10000 14800x10000+0+0 DirectClass 1-bit 526.352kb 0.969u 0:01
2006___06-0119-011_00006.tif[6] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 10.8066kb 0.063u 0:01
2006___06-0119-011_00007.tif[7] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 25.3906kb 0.063u 0:01
...
2006___06-0119-011_00057.tif[57] TIFF 2544x3300 2544x3300+0+0 DirectClass 1-bit 15.2969kb 0.063u 0:01
Does the solution have to be the same across all of the pages?
i.e. Should I be resizing pages as I go, changing
2006___06-0119-011_00005.tif[5] TIFF
14800x10000 14800x10000+0+0 DirectClass 1-bit 526.352kb 0.969u 0:01
to
2006___06-0119-011_00005.tif[5] TIFF
2544x3300 2544x3300 DirectClass 1-bit 526.352kb 0.969u 0:01 ?
I ran the command manually without this page and did not get the error. After adding the page back into the command, I started getting the error again. This page is a valid TIF file according to identify and opens fine with the Windows File & Fax Viewer.
Re: No Space for Output Buffer with Convert
Posted: 2008-01-03T10:40:13-07:00
by magick
It appears the problem is within the TIFF delegate library. Your 2006___06-0119-011_00005.tif image file may have only one or two strips which causes the TIFF delegate library to try to allocate a huge buffer which Windows rejects. ImageMagick caches large images to disk to avoid this problem, but TIFF does not. Try this command:
- tiffinfo 2006___06-0119-011_00005.tif
and post what it reports or post a URL to your image so we can download and inspect it.
Re: No Space for Output Buffer with Convert
Posted: 2008-01-03T12:39:35-07:00
by aneiman
Here's what I get:
Code: Select all
tiffinfo 2006___06-0119-011_00005.tif
TIFF Directory at offset 0x837f0
Image Width: 14800 Image Length: 10000
Resolution: 400, 400 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-black
FillOrder: msb-to-lsb
Date & Time: "2007:12:18 12:30:24"
Software: "ImageMagick 6.3.7 12/05/07 Q8 http://www.imagemagick.org"
Document Name: "D:\Release\Backfile\Redacted\\2006___06-0119-011_00005.tif"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 10000
Planar Configuration: single image plane
Just for something to compare against, here's the output for the last page:
Code: Select all
tiffinfo 2006___06-0119-011_00057.tif
TIFF Directory at offset 0x3bb8
Image Width: 2544 Image Length: 3300
Resolution: 300, 300 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-black
FillOrder: msb-to-lsb
Date & Time: "2007:12:18 12:30:29"
Software: "ImageMagick 6.3.7 12/05/07 Q8 http://www.imagemagick.org"
Document Name: "D:\Release\Backfile\Redacted\\2006___06-0119-011_00057.tif"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 3300
Planar Configuration: single image plane
It looks like the rows/strip are definitely different, but so are the resolutions and image sizes.
Re: No Space for Output Buffer with Convert
Posted: 2008-01-13T20:10:43-07:00
by aneiman
Still no luck so far with the option changes. Does anyone have any ideas?