braingram/pylibtiff

TIFF.write_image writes incorrect ORIENTATION tag

Closed this issue · 4 comments

What steps will reproduce the problem?
1.  Write image data using TIFF.open(filename, 'w').write(data)

What is the expected output? What do you see instead?

The created diff file has orientation 6 (

The offending lines are in libtiff_ctypes.py, lines 403, 420, and 453:

self.SetField(TIFFTAG_ORIENTATION, ORIENTATION_RIGHTTOP)

The correct value is 1, not 6.  See, for example,

http://www.awaresystems.be/imaging/tiff/tifftags/orientation.html

Note also that simply not setting the orientation tag also results in a correct 
image.

What version of the product are you using? On what operating system?

pylibtiff 0.1svn, Linux Ubuntu 10.10


Please provide any additional information below.


Original issue reported on code.google.com by fluid.th...@gmail.com on 25 Nov 2011 at 10:14

Correction:  the offending function call is: 

TIFF.open(filename, 'w').write_image(data)

Original comment by fluid.th...@gmail.com on 25 Nov 2011 at 10:15

Please note that the patch provided in issue 21 should contain a fix for this 
issue.

Original comment by eric.p...@gmail.com on 21 Aug 2013 at 4:32

[deleted comment]
Patch from issue 21 has been applied to svn.

Original comment by pearu.peterson on 13 Sep 2014 at 10:18

  • Changed state: Done