GithubHelp home page GithubHelp logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.