@ warning/transform.c/CropImage/574

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
sbico
Posts: 3
Joined: 2012-09-29T08:53:59-07:00
Authentication code: 67789

@ warning/transform.c/CropImage/574

Post by sbico »

Hi,

I'm trying to resize and crop an image as follow :

Code: Select all

mogrify -path /Users/Sbico/Test -resize 1198x -gravity Center -crop 1198x1080+0+0 *
and I have this error message:

Code: Select all

mogrify: geometry does not contain image `/Users/Sbico/Test/Ombre_00019355.tif' @ warning/transform.c/CropImage/574.
I'm on ImageMagick @6.7.9-0 installed via MacPort on osx 10.7

The strage thingh is that works on linux...

Any Idea?

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

Re: @ warning/transform.c/CropImage/574

Post by fmw42 »

One of your images may be smaller than the crop size. Look at the verbose info for /Users/Sbico/Test/Ombre_00019355.tif and see if it is too small, has a virtual canvas or has multiple layers, or is a pyramid format. You may need to update your libtiff.


Also add +repage after the crop to be sure to remove the virtual canvas. Also use -format if you want the results to be one particular format.
sbico
Posts: 3
Joined: 2012-09-29T08:53:59-07:00
Authentication code: 67789

Re: @ warning/transform.c/CropImage/574

Post by sbico »

Hi fmw42,

My original /user/sbico/DCP/Ombre_00005966.tif is 1920x1080.

If I try

Code: Select all

mogrify -path /users/sbico/Test -resize 1998x  *
I have an Image of1998x1124, so I think isn't a size problem.

I also try with -repage but doesn't work, same error message!

For identify -verbose it return

Code: Select all

Image: Ombre_00005966.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 1920x1080+0+0
  Units: PixelsPerInch
  Type: TrueColor
  Base type: TrueColor
  Endianess: MSB
  Colorspace: sRGB
  Depth: 16-bit
  Channel depth:
    red: 16-bit
    green: 16-bit
    blue: 16-bit
  Channel statistics:
    Red:
      min: 0 (0)
      max: 45087 (0.687984)
      mean: 17966.7 (0.274154)
      standard deviation: 8991.44 (0.137201)
      kurtosis: -0.375389
      skewness: 0.0192426
    Green:
      min: 0 (0)
      max: 47020 (0.717479)
      mean: 18274.4 (0.278849)
      standard deviation: 9362.55 (0.142863)
      kurtosis: -0.363662
      skewness: 0.0821698
    Blue:
      min: 0 (0)
      max: 46183 (0.704707)
      mean: 15811.6 (0.241269)
      standard deviation: 8865.26 (0.135275)
      kurtosis: -0.117404
      skewness: 0.371722
  Image statistics:
    Overall:
      min: 0 (0)
      max: 47020 (0.717479)
      mean: 17350.9 (0.264757)
      standard deviation: 9075.54 (0.138484)
      kurtosis: -0.265045
      skewness: 0.163685
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Interlace: None
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Compose: Over
  Page geometry: 1920x1080-9223372036854775808-9223372036854775808
  Origin geometry: -9223372036854775808-9223372036854775808
  Dispose: Undefined
  Iterations: 0
  Compression: None
  Orientation: TopLeft
  Properties:
    date:create: 2012-09-29T15:29:26+02:00
    date:modify: 2012-09-28T18:18:25+02:00
    signature: 1d74622e2a39eaccecc92d851b7a13c5fccdd36c19b86d63700cfdfd719c9f25
    tiff:endian: lsb
    tiff:photometric: RGB
    tiff:rows-per-strip: 1
  Artifacts:
    filename: Ombre_00005966.tif
    verbose: true
  Tainted: False
  Filesize: 12.44MB
  Number pixels: 2.074M
  Pixels per second: 7.406MB
  User time: 0.100u
  Elapsed time: 0:01.280
  Version: ImageMagick 6.7.9-0 2012-09-29 Q16 http://www.imagemagick.org
No layer, no pyramid I think...

Just in case I have LIBTIFF, Version 3.9.5, but I have no idea how to update, I mean I'm not very good in compiling....

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

Re: @ warning/transform.c/CropImage/574

Post by fmw42 »

It was +repage and not -repage that I suggested. Otherwise, perhaps post a link to your file. Also try just convert and see if you still get the same message. Libtiff 3.9.5 should be fine.
sbico
Posts: 3
Joined: 2012-09-29T08:53:59-07:00
Authentication code: 67789

Re: @ warning/transform.c/CropImage/574

Post by sbico »

Sorry for -repage :D

I try with convert, but same error message.

Here the image : https://www.yousendit.com/download/TEhX ... a1hIRHRVag

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

Re: @ warning/transform.c/CropImage/574

Post by fmw42 »

This command works fine for me on IM 6.7.9.8 Q16 Mac OSX Snow Leopard with libtiff 3.9.5

convert Ombre_00005966.tif -resize 1198x -gravity Center -crop 1198x1080+0+0 +repage Ombre_00005966_small.tif

If it fails for you, then perhaps you need to upgrade IM.
Post Reply