Comments (4)
I looked into this and will try to fix it today. The problem is in the 4.0.3
header starting with this line:
#define CODINGMETHODS_T4_1D (1 << 1) /* !T.4 1D */
Since the value has spaces in it the string filtering cuts off everything after
"(1" which isn't valid python. The proposed solution doesn't seem to work for
me, I'm looking into it now. And unless I'm missing something the
"eval(value,d)" shouldn't be needed since there is a "if value in d" check
right above that.
The proposed solution fails on my machine because it doesn't remove the
whitespace after "FAXMODE_NORTC" and then doesn't match in the dictionary.
Still doesn't solve the TIFFTAG_COLORMAP undefined problem either.
Thanks for reporting the bug.
Original comment by [email protected]
on 23 Apr 2013 at 9:08
from pylibtiff.
I have a fix to this bug (I have forgotten to commit it).
Will commit in a moment or so.
Original comment by pearu.peterson
on 23 Apr 2013 at 9:25
from pylibtiff.
Thanks, I'll try it out. FYI here is my fix:
Index: libtiff/libtiff_ctypes.py
===================================================================
--- libtiff/libtiff_ctypes.py (revision 90)
+++ libtiff/libtiff_ctypes.py (working copy)
@@ -71,11 +71,11 @@
d = {}
for line in f.readlines():
if not line.startswith('#define'): continue
- words = line[7:].lstrip().split()[:2]
+ words = line[7:].lstrip().split(None, 1)[:2]
if len (words)!=2: continue
name, value = words
i = value.find('/*')
- if i!=-1: value = value[:i]
+ if i!=-1: value = value[:i].strip()
if value in d:
value = d[value]
else:
Original comment by [email protected]
on 23 Apr 2013 at 9:55
from pylibtiff.
I presume the issue is Fixed. Please open when the issue persists.
Original comment by pearu.peterson
on 22 May 2013 at 7:55
- Changed state: Fixed
from pylibtiff.
Related Issues (20)
- TIFFimage and RGB HOT 4
- Support for EXIF tags HOT 3
- fails to compile (Windows 7, VS2008, Python 2.7, numpy 1.6.1) HOT 6
- tests fail on all os.remove() on Windows HOT 8
- TIFF.write_image writes incorrect ORIENTATION tag HOT 4
- Reading tiffarray of large images
- http://openjpeg.googlecode.com/svn/dev-utils/scripts/generate_big_files.sh HOT 3
- RGB image format doesn't follow the standard numpy RGB format HOT 2
- bittools extension fails to compile on Fedora 18 (python 2.7.3, gcc 4.7.2, numpy 1.7.0) HOT 5
- Enhance parsing of tiff.h HOT 1
- TIFF.read_image() fails to read RGB images HOT 1
- Unknown TIFF tags HOT 2
- Writing a field with an empty string segfault with the C wrapper HOT 1
- Failure to import tif_lzw HOT 3
- incorrectly imports big-endian 16bit uints
- Fail to import libtiff in Ubuntu 14.04 HOT 8
- Let's put pylibtiff on PyPI so that other packages can install it as a dependency. HOT 2
- libtiff 4.x and custom tags
- Cannot be installed with Python3 (even after 2to3 translator)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylibtiff.