Using convert.exe on corrupt tif file

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
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Using convert.exe on corrupt tif file

Post by lolhun1988 »

Hi,

I tried to convert a tif file and I got this message during this process.

Code: Select all

convert.exe test_in.tif test_out.tif
Error:
Magick: unable to extend cache `test_in.tif': No space left on device @ error/cache.c/OpenPixelCache/4140.

Any idea why can not convert this file?
Version: ImageMagick-6.7.0-6-Q16-windows-static.exe

Regards,
Adam
Last edited by lolhun1988 on 2011-06-16T12:13:36-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using convert.exe on wrong tif file

Post by fmw42 »

what is the size of the input image and how much memory does your computer have? can you post a link to your input image so others can test. perhaps the input image is corrupt in some way?

is convert.exe the Imagemagick convert or the Windows convert? perhaps you are not using the IM convert, which many people rename to imconvert to avoid this confusion.
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Re: Using convert.exe on corrupt tif file

Post by lolhun1988 »

fmw42 wrote:what is the size of the input image and how much memory does your computer have? can you post a link to your input image so others can test. perhaps the input image is corrupt in some way?

is convert.exe the Imagemagick convert or the Windows convert? perhaps you are not using the IM convert, which many people rename to imconvert to avoid this confusion.
The input image size is 22 MB, my computer has 3 GB of RAM. Unfortunately I can't publish the image but yes the tif file is corrupt but I don't know that in what way! I tried to convert with the ImagMagick convert.exe because when I type convert to the cmd it says it is ImageMagick convert.

Code: Select all

C:\Documents and Settings\Moka>convert
Version: ImageMagick 6.7.0-3 2011-05-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using convert.exe on corrupt tif file

Post by fmw42 »

what do you get from

identify -verbose test_in.tiff
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Re: Using convert.exe on corrupt tif file

Post by lolhun1988 »

fmw42 wrote:what do you get from

identify -verbose test_in.tiff
This is the result:

Code: Select all

G:\Users\Durnek60>identify -verbose c:\Scan\Scan.tif
Image: c:\Scan\Scan.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 11072x17400+0+0
  Resolution: 72x72
  Print size: 153.778x241.667
  Units: PixelsPerInch
  Type: Bilevel
  Base type: Bilevel
  Endianess: MSB
  Colorspace: RGB

User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using convert.exe on corrupt tif file

Post by fmw42 »

Geometry: 11072x17400+0+0
Your image is 192 Mbytes.

There should also be more information from the -verbose info

Your computer may have limits on the amount of memory that can be used by any one application.
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Re: Using convert.exe on corrupt tif file

Post by lolhun1988 »

fmw42 wrote:
Geometry: 11072x17400+0+0
Your image is 192 Mbytes.

There should also be more information from the -verbose info

Your computer may have limits on the amount of memory that can be used by any one application.
Irfanview gives this information about the picture so I think it's not 192 Mbytes it's impossible.

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using convert.exe on corrupt tif file

Post by fmw42 »

Sorry I meant Mega Pixels obtained by multiply width x height. Your image is binary (b/w), so that accounts for the smaller file size.
However, if IM converts that internally to truecolor? then the input file size would be 3x192 Mbytes and would require the equivalent on ouput. So you might be needing about 1.2 Gbytes. I am not sure how IM handles that internally!

however try

convert test_in.tif -type bilevel test_out.tif


or post a link to your file so others can test with it.

You could also try massive image processing commands, see http://www.imagemagick.org/Usage/files/#massive
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Re: Using convert.exe on corrupt tif file

Post by lolhun1988 »

fmw42 wrote:Sorry I meant Mega Pixels obtained by multiply width x height. Your image is binary (b/w), so that accounts for the smaller file size.
However, if IM converts that internally to truecolor? then the input file size would be 3x192 Mbytes and would require the equivalent on ouput. So you might be needing about 1.2 Gbytes. I am not sure how IM handles that internally!

however try

convert test_in.tif -type bilevel test_out.tif


or post a link to your file so others can test with it.

You could also try massive image processing commands, see http://www.imagemagick.org/Usage/files/#massive
Okay thanks for your help! I'm going to test it. Unfortunately I can't publish these pictures because those are secret. Thanks your help again. If I have problems or questions I'm going to write here.
lolhun1988
Posts: 8
Joined: 2011-06-14T06:44:02-07:00
Authentication code: 8675308

Re: Using convert.exe on corrupt tif file

Post by lolhun1988 »

fmw42 wrote:Sorry I meant Mega Pixels obtained by multiply width x height. Your image is binary (b/w), so that accounts for the smaller file size.
However, if IM converts that internally to truecolor? then the input file size would be 3x192 Mbytes and would require the equivalent on ouput. So you might be needing about 1.2 Gbytes. I am not sure how IM handles that internally!

however try

convert test_in.tif -type bilevel test_out.tif


or post a link to your file so others can test with it.

You could also try massive image processing commands, see http://www.imagemagick.org/Usage/files/#massive
I went to the press and made a corrupt tif file with the scanner here it is! So it occurs when we set a bad lenght parameter and I need to solve this problem.

http://dl.dropbox.com/u/5179477/C%2B%2B/Scan.tif
Post Reply