TIFF: negative image positions unsupported

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
starquad
Posts: 2
Joined: 2014-07-22T01:35:37-07:00
Authentication code: 6789

TIFF: negative image positions unsupported

Post by starquad »

Hi,

I am "a little bit" stuck :? I am getting the error "TIFF: negative image positions unsupported" (see below) when running convert.exe (see below) on a TIF-image (see info below) in order to rotate that image be 90 degrees.

There is no issue when converting jpg-files, so I don't see why the same would not work for tif-files? Also, I can't make any sense of "negative image positions". Is this a bug or am I missing something? Any alternatives to rotating an image by +90 or -90 degrees?

Any help would be greatly appreciated. Thank you!

Reiner

Here is the full error message:

Code: Select all

convert.exe -rotate 90 page001.tif out.tif
convert.exe: TIFF: negative image positions unsupported out.tif @ error/tiff.c/WriteTIFFImage/3283.
Here is the information on convert.exe

Code: Select all

Version: ImageMagick 6.8.8-9 Q16 x86 2014-03-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib cairo freetype jbig jng jp2 jpeg lcms lqr pangocairo png ps rsvg tiff webp xml zlib
Here is the image information:

Code: Select all

Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 2441x3398+0+0
Resolution: 300x300
Print size: 8.13667x11.3267
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: Gray
Depth: 1-bit
Channel depth:
  gray: 1-bit
Channel statistics:
  Gray:
    min: 0 (0)
    max: 1 (1)
    mean: 0.938278 (0.938278)
    standard deviation: 0.24065 (0.24065)
    kurtosis: 11.2674
    skewness: -3.64244
Colors: 2
Histogram:
  511956: (  0,  0,  0) #000000 gray(0)
 7782562: (255,255,255) #FFFFFF gray(255)
Rendering intent: Undefined
Gamma: 0.454545
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 2441x3398+2590+70
Origin geometry: +2590+70
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
  date:create: 2014-07-21T20:30:25+02:00
  date:modify: 2014-07-21T20:30:25+02:00
  signature: 2988ae6a368514521004389bd023e01ce95fc81fd1a76d2e3eecb607a80b3695
  tiff:endian: lsb
  tiff:photometric: min-is-black
  tiff:rows-per-strip: 26
Artifacts:
  filename: BroschTest\page001.tif
  verbose: true
Tainted: False
Filesize: 1.041MB
Number pixels: 8.295M
Pixels per second: 69.7MB
User time: 0.062u
Elapsed time: 0:01.119
Version: ImageMagick 6.8.8-9 Q16 x86 2014-03-16 http://www.imagemagick.org
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: TIFF: negative image positions unsupported

Post by snibgo »

Tif can't store negative offsets, so "+repage" is the usual cure for this.

However, I notice that your command is in the wrong order. It should be:

Code: Select all

convert.exe page001.tif -rotate 90 out.tif
And "-rotate 90" shouldn't create a negative offset. I happen to have 6.8.8-9 x86, exactly the same as you, and neither your command nor the correct version gives this problem. Nor does the current version of IM.
snibgo's IM pages: im.snibgo.com
starquad
Posts: 2
Joined: 2014-07-22T01:35:37-07:00
Authentication code: 6789

Re: TIFF: negative image positions unsupported

Post by starquad »

Hi,

fantastic! Thanks a lot! +repage is indeed the cure.

BTW, the "-rotate 90" produces the same result whether it is before or after the source file. In fact, I used your version originally, but when I became desperate, I moved this around :)

Anyway, thank you so much for the perfectly on target hint!

Reiner
Post Reply