[Git][debian-gis-team/pylibtiff][upstream] New upstream version 0.6.1

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Sep 23 17:47:55 BST 2023



Antonio Valentino pushed to branch upstream at Debian GIS Project / pylibtiff


Commits:
7209f482 by Antonio Valentino at 2023-09-23T16:28:02+00:00
New upstream version 0.6.1
- - - - -


16 changed files:

- .git_archival.txt
- .github/workflows/ci.yaml
- .github/workflows/deploy-sdist.yaml
- README.md
- − libtiff/optparse_gui.py
- libtiff/script_options.py
- libtiff/scripts/convert.py
- libtiff/scripts/info.py
- libtiff/test_bittools.py
- libtiff/tests/test_lzw.py
- libtiff/tests/test_tiff_file.py
- libtiff/tests/test_tiff_image.py
- libtiff/tiff_file.py
- + libtiff/tiff_h_4_6_0.py
- libtiff/tiff_image.py
- pyproject.toml


Changes:

=====================================
.git_archival.txt
=====================================
@@ -1,4 +1,4 @@
-node: b67eae36795cd772e99c45536756cef6b191a4de
-node-date: 2022-12-21T10:50:44+02:00
-describe-name: v0.5.1
-ref-names: HEAD -> master, tag: v0.5.1
+node: 689089d9e7fd03863487463a570c60966c6e74f8
+node-date: 2023-09-21T05:55:44-05:00
+describe-name: v0.6.1
+ref-names: HEAD -> master, tag: v0.6.1


=====================================
.github/workflows/ci.yaml
=====================================
@@ -99,7 +99,6 @@ jobs:
           --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple/ \
           --trusted-host pypi.anaconda.org \
           --no-deps --pre --upgrade \
-          matplotlib \
           numpy;
           LD_PRELOAD=$(python -c "import sys; print(sys.prefix)")/lib/libstdc++.so
           echo "LD_PRELOAD=${LD_PRELOAD}" >> $GITHUB_ENV


=====================================
.github/workflows/deploy-sdist.yaml
=====================================
@@ -21,7 +21,7 @@ jobs:
 
       - name: Publish package to PyPI
         if: github.event.action == 'published'
-        uses: pypa/gh-action-pypi-publish at v1.6.4
+        uses: pypa/gh-action-pypi-publish at v1.8.10
         with:
           user: __token__
           password: ${{ secrets.pypi_password }}


=====================================
README.md
=====================================
@@ -65,7 +65,7 @@ LSM files, it is as fast as libtiff.py by using numpy.
 # Script usage examples #
 
 ```
-$ libtiff.info -i result_0.tif --no-gui
+$ libtiff.info -i result_0.tif
 IFDEntry(tag=ImageWidth, value=512, count=1, offset=None)
 IFDEntry(tag=ImageLength, value=512, count=1, offset=None)
 IFDEntry(tag=BitsPerSample, value=32, count=1, offset=None)
@@ -92,7 +92,7 @@ strip_length : 1048576
 ```
 
 ```
-$ libtiff.info --no-gui -i psf_1024_z5_airy1_set1.lsm
+$ libtiff.info -i psf_1024_z5_airy1_set1.lsm
 IFDEntry(tag=NewSubfileType, value=0, count=1, offset=None)
 IFDEntry(tag=ImageWidth, value=1024, count=1, offset=None)
 IFDEntry(tag=ImageLength, value=1024, count=1, offset=None)


=====================================
libtiff/optparse_gui.py deleted
=====================================
@@ -1,1125 +0,0 @@
-"""A drop-in replacement for :pythonlib:`optparse` ("import
-iocbio.optparse_gui as optparse")
-
-Provides an identical interface to :pythonlib:`optparse`.OptionParser,
-in addition, it displays an automatically generated `wx
-<http://www.wxpython.org>`_ dialog in order to enter the options/args,
-instead of parsing command line arguments.
-
-This code is based on `optparse_gui module
-<http://code.google.com/p/optparse-gui/>`_. Unfortunately the owner of
-optparse_gui did not respond to a request to join the optparse_gui
-group. By now this module has become more complete with more features.
-
-Module content
---------------
-
-"""
-# Author: Pearu Peterson
-# Created: September 2009
-
-# flake8: noqa
-
-from __future__ import division, print_function
-
-__all__ = ['OptionParser', 'Option']
-
-import os
-import signal
-import sys
-import re
-import shutil
-import tempfile
-import optparse
-import wx
-import subprocess as std_subprocess
-
-if os.name=='nt':
-    from . import killableprocess as subprocess
-else:
-    subprocess = std_subprocess
-
-multiprocessing = None
-try:
-    import multiprocessing # Python <=2.5 users should install http://code.google.com/p/python-multiprocessing/
-except ImportError:
-    pass
-
-import traceback
-try:
-    import queue as queue
-except ImportError as e:
-    import Queue as queue
-
-from .utils import splitcommandline
-
-__version__ = 0.9
-
-debug = 1
-
-bug_report_email = 'iocbio-bugs at googlegroups.com'
-smtp_server = 'cens.ioc.ee'
-
-bug_report_email = None # disables the Bug Report button
-
-signal_map = {}
-for n,v in list(signal.__dict__.items ()):
-    if isinstance(v, int):
-        signal_map[v] = n
-
-
-def pretty_signal (s):
-    r = signal_map.get(s)
-    if r is None:
-        r = signal_map.get(abs(s))
-        if r is None:
-            return str(s)
-    return '%s[%s]' % (s,r)
-
-
-def fix_float_string(s):
-    if not s: return '0'
-    if s[-1] in 'eE+-': return s + '0'
-    return s
-
-
-def fix_int_string (s):
-    if s in ['+','-']: return s + '0'
-    return s
-
-
-def get_fixed_option_value (option, s):
-    if option.type == 'float':
-        return fix_float_string(s)
-    if option.type == 'int':
-        return fix_int_string(s)
-    if option.type == 'long':
-        return fix_int_string(s)
-    if option.type == 'choice':
-        choices = list(map(str, option.choices))
-        try:
-            return option.choices[choices.index(str(s))]
-        except ValueError:
-            pass
-    return s
-
-
-def os_kill(pid, s):
-    if os.name == 'nt':
-        if s == signal.SIGTERM or s == signal.SIGINT:
-            import win32api
-            handle = win32api.OpenProcess(1, 0, pid)
-            return (0 != win32api.TerminateProcess(handle, 127))
-        if s == signal.SIGINT:
-            import ctypes
-            return (0 != ctypes.windll.kernel32.GenerateConsoleCtrlEvent (1, pid))
-    return os.kill (pid, s)
-
-
-class SysOutListener:
-    debug_stream = '__stdout__'
-    def __init__ (self, queue):
-        self.queue = queue
-
-    def write(self, string):
-        if debug:
-            stream = getattr (sys, self.debug_stream)
-            if multiprocessing is not None or not string.startswith('\r'):
-                stream.write(string)
-            stream.flush()
-        if multiprocessing is None:
-            self.queue.put(string)
-        else:
-            if not self.queue._closed:
-                self.queue.put(string)
-        #wx.WakeUpIdle() # it does not seem to have effect, so using wx.Timer below
-
-    def flush (self):
-        if debug:
-            stream = getattr (sys, self.debug_stream)
-            stream.flush()
-
-class SysErrListener (SysOutListener):
-    debug_stream = '__stderr__'
-
-    def write (self, string):
-        if not self.queue._closed:
-            self.queue.put('@STDERR START@')
-        SysOutListener.write (self, string)
-        if not self.queue._closed:
-            self.queue.put('@STDERR END@')
-
-class FunctionWrapper (object):
-
-    def __init__ (self, func, log_queue = None):
-        self.log_queue = log_queue
-        self.func = func
-
-    def __call__(self, *args, **kw):
-        if self.log_queue is not None:
-            saved_streams =  sys.stdout, sys.stderr
-            sys.stdout = SysOutListener(self.log_queue)
-            sys.stderr = SysErrListener(self.log_queue)
-        
-        status = 0
-        try:
-            self.func(*args, **kw)
-        except:
-            print("Exception in runner process:")
-            print('-'*60)
-            traceback.print_exc(file=sys.stdout)
-            print('-'*60)        
-            status = 1
-
-        if self.log_queue is not None:
-            sys.stdout, sys.stderr = saved_streams
-        return status
-
-class OptionValidator (wx.PyValidator):
-
-    def __init__ (self, option):
-        wx.PyValidator.__init__ (self)
-        self.option = option
-        self.Bind (wx.EVT_CHAR, self.OnChar)
-
-    def Clone (self):
-        return OptionValidator(self.option)
-    
-    def Validate (self, win):
-        return True
-
-    def OnChar(self, event):
-        key = event.GetKeyCode()
-        if key < wx.WXK_SPACE or key == wx.WXK_DELETE or key > 255:
-            event.Skip ()
-            return
-        if self.option.type == 'choice':
-            return
-
-        textCtrl = self.GetWindow()
-        i = textCtrl.GetInsertionPoint()
-        char = chr(key)
-        text = textCtrl.GetValue()
-        new_text = get_fixed_option_value(self.option, text[:i] + char + text[i:])
-        try:
-            self.option.TYPE_CHECKER[self.option.type](self.option, self.option.dest, new_text)
-        except optparse.OptionValueError as msg:
-            if not wx.Validator_IsSilent():
-                wx.Bell()
-            print(msg, file=sys.stderr)
-            return
-        event.Skip()
-
-
-class OptionPanel( wx.Panel ):
-    
-    def __init__(self, parent, option_list, main_frame):
-        wx.Panel.__init__ (self, parent)
-
-        sizer = wx.FlexGridSizer(cols=3, hgap=5, vgap=5)
-        sizer.AddGrowableCol(1)
-
-        destinations_list = []
-        for option in option_list:
-
-            help = option.help or 'specify %s option. Default: %%default.' % (option.get_opt_string())
-            if '%default' in help:
-                if option.default == optparse.NO_DEFAULT:
-                    help = help.replace ('%default', 'none')
-                else:
-                    if option.action == 'store_false':
-                        help = help.replace ('%default', str(not option.default if option.default is not None else option.default))
-                    else:
-                        help = help.replace ('%default', str(option.default))
-
-            if option.action == 'store':
-                label_txt = option.get_opt_string() + '='
-                label = wx.StaticText(self, -1, label_txt )
-                label.SetHelpText( help)
-                sizer.Add (label, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
-
-                if option.type == 'choice':
-                    if option.default == optparse.NO_DEFAULT:
-                        option.default = option.choices[0]
-                    ctrl = wx.ComboBox(
-                        self, -1, choices = list(map(str,option.choices)),
-                        value = str(option.default),
-                        style = wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT 
-                    )
-                    sizer.Add (ctrl, 0, wx.EXPAND)
-                    sizer.Add ((20,20),0)
-                elif option.type in ['string', 'int', 'float']:
-                    ctrl = wx.TextCtrl( self, -1, "", style=wx.TE_PROCESS_ENTER)
-                    if option.default not in [optparse.NO_DEFAULT, None]:
-                        ctrl.Value = str(option.default)
-                    sizer.Add (ctrl, 0, wx.EXPAND)
-                    sizer.Add ((20,20),0)
-                elif option.type == 'multiline':
-                    ctrl = wx.TextCtrl( self, -1, "", size=(300,100), 
-                                        style = wx.TE_MULTILINE|wx.TE_PROCESS_ENTER )
-                    if option.default not in [optparse.NO_DEFAULT, None]:
-                        ctrl.Value = option.default
-                    sizer.Add (ctrl, 0, wx.EXPAND)
-                    sizer.Add ((20,20),0)
-                elif option.type in ['file', 'directory']:
-                    ctrl = wx.TextCtrl( self, -1, "")
-                    if option.default not in [optparse.NO_DEFAULT, None]:
-                        ctrl.Value = option.default
-                    sizer.Add (ctrl, 0, wx.EXPAND)
-
-                    browse = wx.Button( self, label='Browse..' )
-                    browse.SetHelpText( 'Click to open %s browser' % (option.type) )
-                    wx.EVT_BUTTON(self, browse.GetId(), main_frame.OnSelectPath)
-                    main_frame.browse_option_map[browse.GetId()] = option, ctrl
-                    sizer.Add(browse, 0, wx.ALIGN_CENTRE|wx.ALL, 1 )
-                else:
-                    raise NotImplementedError (repr(option.type))
-                destinations_list.append(option.dest)
-
-            elif option.action in ['store_true', 'store_false']:
-                if option.dest in destinations_list:
-                    continue
-                ctrl = wx.CheckBox( self, -1, option.get_opt_string())
-                #ctrl = wx.ToggleButton( self, -1, option.get_opt_string())
-                if option.default not in [None, optparse.NO_DEFAULT]:
-                    if option.action == 'store_false':
-                        ctrl.SetValue(not option.default)
-                    else:
-                        ctrl.SetValue(option.default)
-                sizer.Add (ctrl, 0, wx.EXPAND)
-                #sizer.Add ((20,20),0)
-                sizer.Add (wx.StaticText(self,-1,help),0,wx.ALIGN_CENTER_VERTICAL)
-                sizer.Add ((20,20),0)
-                destinations_list.append(option.dest)
-            elif option.action == 'help':
-                ctrl = wx.Button( self, -1, 'Help')
-                sizer.Add (ctrl, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT)
-                #sizer.Add ((20,20),0)
-                sizer.Add (wx.StaticText(self,-1,"print help message"),0,wx.ALIGN_CENTER_VERTICAL)
-                sizer.Add ((20,20),0)
-                self.Bind(wx.EVT_BUTTON, main_frame.OnHelp, id=ctrl.GetId())
-            elif option.action == 'store_const':
-                if option.dest in destinations_list:
-                    continue
-            else:
-                raise NotImplementedError (repr(option.action))
-
-            if option.type in option.TYPE_CHECKER:
-                ctrl.SetValidator(OptionValidator(option))
-
-            ctrl.SetHelpText( help )
-            main_frame.option_controls[ option ] = ctrl
-
-
-        self.SetSizer(sizer)
-        self.Fit()
-        #sizer.SetSizeHints(self)
-
-class OptparseFrame (wx.Frame):
-
-    def capture_std_streams(self):
-        global multiprocessing
-        if multiprocessing is None:
-            self.log_queue = queue.Queue()
-        else:
-            try:
-                self.log_queue = multiprocessing.Queue()
-            except WindowsError as msg:
-                print('multiprocessing.Queue raised WindowsError: %s' % (msg))
-                print('Disableing multiprocessing')
-                multiprocessing = None
-                self.log_queue = None
-                return
-                self.log_queue = queue.Queue()
-        self._saved_streams =  sys.stdout, sys.stderr
-        sys.stdout = SysOutListener(self.log_queue)
-        sys.stderr = SysErrListener(self.log_queue)
-
-    def restore_std_streams (self):
-        if self.log_queue is not None:
-            sys.stdout, sys.stderr = self._saved_streams
-            if multiprocessing is not None:
-                self.log_queue.close()
-            self.log_queue = None
-
-    def __init__(self, option_parser):
-
-        self.option_parser = option_parser
-        self.option_parser.result = None 
-        self.capture_std_streams()
-        run_methods = getattr(option_parser, 'run_methods', ['subprocess', 'subcommand'])
-
-        self.option_controls = {}
-        self.browse_option_map = {}
-        self.process_list = []
-
-        wx.Frame.__init__(self, None, title="Optparse Dialog: %s" % (os.path.basename(sys.argv[0])))
-        p = wx.Panel(self)
-
-        provider = wx.SimpleHelpProvider()
-        wx.HelpProvider_Set(provider)
-
-        nb = wx.Notebook(p)
-        
-        option_panel = OptionPanel(nb, option_parser.option_list, self)
-        option_panel.SetHelpText (option_parser.description or 'Main options')
-        nb.AddPage(option_panel, 'Main Options')
-
-        pages = []
-        for group in option_parser.option_groups:
-            if group in pages:
-                continue
-            option_panel = OptionPanel(nb, group.option_list, self)
-            option_panel.SetHelpText (group.description or 'Group options')
-            nb.AddPage(option_panel, group.title)
-            pages.append(group)
-
-        sizer_a = wx.BoxSizer (wx.VERTICAL)
-        self.args_ctrl = args_ctrl = wx.TextCtrl(p, -1, '', size = ( -1, 80 ), 
-                                                 style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER )
-        args_ctrl.SetHelpText ('''\
-Arguments can be either separated by a space or a newline. Arguments
-that contain spaces must be entered like so: "arg with space"\
-''')
-        label = wx.StaticText(p, -1, 'Arguments:' )
-        label.SetHelpText( 'Enter arguments here' )
-        sizer_a.Add (label, 0, wx.EXPAND)
-        sizer_a.Add (args_ctrl, 0, wx.EXPAND)
-        args_ctrl.Fit ()
-
-        sizer_b = wx.BoxSizer (wx.HORIZONTAL)
-
-
-        cancel_b = wx.Button(p, -1, 'Cancel')
-        cancel_b.SetHelpText('Cancel the program without saving')
-
-        if debug>1:
-            test_b = wx.Button(p, -1, 'Test')
-            test_b.SetHelpText('Test options')
-
-        run_b = None
-        if option_parser.runner is not None or 1:
-            self.run_b = run_b = wx.Button(p, -1, 'Run')
-            run_b.SetHelpText('Run script with specified options and arguments.')
-
-        batch_b = None
-        if 0:
-            self.batch_b = batch_b = wx.Button(p, -1, 'Batch')
-            batch_b.SetHelpText('Run script with specified options and arguments in batch mode and exit.')
-
-        self.exit_b = exit_b = wx.Button(p, -1, 'Exit')
-        exit_b.SetHelpText('Exit without running the script. Any running process will be terminated.')
-
-        send_b = None
-        if bug_report_email:
-            send_b = wx.Button (p, -1, 'Send Bug Report')
-            send_b.SetHelpText ('Send bug report to %r. The bug report will include some environment data, used options and arguments, the content of the log window. If you want to add some notes then enter them to log window before pressing the Send Bug Report button.' % (bug_report_email))
-
-        runner_mth = None
-        if multiprocessing is None or option_parser.runner is None:
-            self.run_method = 'subcommand'
-        else:
-            self.run_method = run_methods[0]
-            if len (run_methods)>1:
-                runner_mth = wx.ComboBox(
-                    p, -1, choices = run_methods,
-                    value = run_methods[0],
-                    style = wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT 
-                    )
-                runner_mth.SetHelpText ('Specify how to run application. Selecting subprocess means using multiprocessing.Process. Selecting subcommand means running the application with --no-gui option and using specified options. If application uses wx then one should select subcommand.')
-
-        sizer_b.Add(cancel_b, 0, wx.ALL, 2)
-        if debug>1:
-            sizer_b.Add(test_b, 0, wx.ALL, 2)
-        if run_b is not None:
-            sizer_b.Add(run_b, 0, wx.ALL, 2)
-            if runner_mth is not None:
-                sizer_b.Add(runner_mth, 0, wx.ALL, 2)
-        if batch_b is not None:
-            sizer_b.Add(batch_b, 0, wx.ALL, 2)
-        sizer_b.Add(exit_b, 0, wx.ALL, 2)
-        if send_b is not None:
-            sizer_b.Add(send_b, 0, wx.ALL, 2)
-
-        self.log_window = log_window = wx.TextCtrl (p, -1, '', style = wx.TE_MULTILINE,
-                                                    size = ( -1, 120 ))
-        log_window.SetFont(wx.Font(8, wx.MODERN, wx.NORMAL, wx.NORMAL, False))
-        log_window.SetHelpText ('Shows the standard output and error messages of a running process.')
-
-        if wx.Platform != "__WXMSW__" or 1:
-            help_b = wx.ContextHelpButton(p)
-            sizer_b.Add((20,20),1)
-            sizer_b.Add(help_b, 0, wx.RIGHT, 2)
-
-        sizer = wx.BoxSizer(wx.VERTICAL)
-        sizer.Add(nb, 0, wx.EXPAND)
-        sizer.Add(sizer_a, 0, wx.EXPAND, 5 )
-        sizer.Add(sizer_b, 0, wx.EXPAND|wx.BOTTOM, 5)
-        sizer.Add(log_window, 1, wx.EXPAND)
-
-        p.SetSizer(sizer)
-        p.Fit ()
-        sizer.SetSizeHints(p)
-
-        self.Fit ()
-
-        self.timer = wx.Timer(self)
-
-
-        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
-        self.Bind(wx.EVT_BUTTON, self.OnCancel, id=cancel_b.GetId())
-        if run_b is not None:
-            self.Bind(wx.EVT_BUTTON, self.OnRun, id=run_b.GetId())
-            if runner_mth is not None:
-                self.Bind(wx.EVT_COMBOBOX, self.OnSelectRunnerMethod, id=runner_mth.GetId())
-        if batch_b is not None:
-            self.Bind(wx.EVT_BUTTON, self.OnBatch, id=batch_b.GetId())
-        if debug>1:
-            self.Bind(wx.EVT_BUTTON, self.OnTest, id=test_b.GetId())
-        self.Bind(wx.EVT_BUTTON, self.OnExit, id=exit_b.GetId())
-        if send_b is not None:
-            self.Bind(wx.EVT_BUTTON, self.OnSend, id=send_b.GetId())
-        self.Bind(wx.EVT_IDLE, self.OnUpdateLogWindow)
-        self.Bind(wx.EVT_TIMER, self.OnUpdateLogWindow, self.timer)
-
-        self.previous_position = 0
-        self._running_count = 0
-
-    def OnSend(self, event):
-        msg = ''
-
-        msg += '-'*40 + '\n'
-        msg += 'Environment\n'
-        msg += '='*40 + '\n'
-        msg += 'os.getcwd(): %r\n' % (os.getcwd())
-        msg += 'sys.argv: ' + repr(sys.argv) + '\n'
-        msg += 'sys.version: ' + repr(sys.version) + '\n'
-        msg += 'sys.prefix: ' + repr(sys.prefix) + '\n'
-        user = None
-        for k in ['USER', 'LOGNAME', 'HOME', 'PYTHONPATH', 'PYTHONSTARTUP', 'LD_LIBRARY_PATH', 'PATH',
-                  'LTSP_CLIENT','SSH_CONNECTION']:
-            v = os.environ.get (k, None)
-            if v is not None:
-                msg += '%s: %r\n' % (k,v)
-
-                if user is None and k in ['USER', 'LOGNAME']:
-                    user = v
-        msg += 'Installation path: %r\n' % (os.path.dirname (__file__))
-        try:
-            from . import version
-            msg += 'Version: %s\n' % (version.version)
-        except Exception as msg:
-            msg += '%s\n' % (msg)
-            pass
-        msg += '-'*40 + '\n'
-
-        msg += '\n'
-        msg += '-'*40 + '\n'
-        msg += 'Options\n'
-        msg += '='*40 + '\n'    
-        try:
-            values, args = self.option_parser.parse_options_args
-            self.set_result()
-            values, args = self.option_parser.get_result (values)
-            msg += 'args=%r\n' % (args)
-            for option in self.option_parser._get_all_options():
-                if option.dest:
-                    value = getattr(values, option.dest, None)
-                    if value is not None:
-                        msg += '%s[dest=%s]: %r\n' % (option.get_opt_string(), option.dest, value)
-        except Exception as m:
-            msg += 'Failed to get option results: %s\n' % (m)
-        msg += '-'*40 + '\n'
-
-        msg += '\n'
-        msg += '-'*40 + '\n'
-        msg += 'Content of log window\n'
-        msg += '='*40 + '\n'
-        msg += self.log_window.GetValue() + '\n'
-        msg += '-'*40 + '\n'
-
-        message = msg
-
-        user_email = user + "@" + smtp_server
-        import smtplib
-        from email.mime.text import MIMEText
-        msg = MIMEText(msg)
-        msg['Subject'] = '[IOCBio bug report] %s' % (sys.argv[0])
-        msg['From'] = user_email
-        msg['To'] = bug_report_email
-
-        try:
-            s = smtplib.SMTP()
-            s.connect(smtp_server)
-            # Send the email - real from, real to,
-            # extra headers and content ...
-            s.sendmail(user_email, bug_report_email, msg.as_string())
-            s.close()
-            print('Bug report succesfully sent to %r' % (bug_report_email))
-        except Exception as msg:
-            print('Failed to send bug report: %s' % (msg))
-            f = open('iocbio_bug_report.txt', 'w')
-            f.write (message)
-            f.close()
-            print('Please find the file "iocbio_bug_report.txt" in the '
-                  'current working directory and send it to %r using your '
-                  'favorite E-mail program.' % bug_report_email)
-
-    def OnSelectRunnerMethod(self, event):
-        self.run_method = event.GetString()
-
-    def OnUpdateLogWindow(self, event):
-        if self.log_queue is not None and not self.log_queue.empty():
-            log_window = self.log_window
-            is_stderr_message = None
-            while 1:
-                try:
-                    v = self.log_queue.get_nowait()
-                except queue.Empty:
-                    break
-                if v == '@STDERR START@':
-                    is_stderr_message = True
-                elif v == '@STDERR END@':
-                    is_stderr_message = False
-                else:
-                    # todo: use is_stderr_message to switch styles
-                    for line in v.splitlines(True):
-                        if line.startswith('\r'):
-                            log_window.Remove(self.previous_position, log_window.GetLastPosition())
-                            line = line[1:]
-                        self.previous_position = log_window.GetInsertionPoint()
-                        log_window.AppendText(line)
-            self.log_window.Refresh()
-
-        if self.process_list:
-            for index, (process, method) in enumerate(self.process_list):
-                if method == 'subprocess':
-                    if not process.is_alive():
-                        self._cleanup_process(process, method)
-                        del self.process_list[index]
-                elif method == 'subcommand':
-                    if process.poll() is not None:
-                        self._cleanup_process(process, method)
-                        del self.process_list[index]
-                else:
-                    raise NotImplementedError (repr(method))
-            self.cleanup_runner()
-
-    def OnHelp (self, event):
-        self.option_parser.print_help()
-
-    def OnTest (self, event):
-        values, args = self.option_parser.parse_options_args
-        self.set_result()
-        new_values, new_args = self.option_parser.get_result (values)
-        print(new_values, new_args)
-
-    def OnBatch (self, event):
-        self.interrupt_runner()
-        self.set_result()
-        self.restore_std_streams()
-        self.Close(True)
-
-    def OnCancel (self, event):
-        while self.process_list:
-            self.interrupt_runner()
-        self.result = None
-        self.restore_std_streams()
-        self.Close(True)
-        sys.exit(0)
-
-    def _start_process (self, method, show_info=[True]):
-        self.set_result()
-        values, args = self.option_parser.parse_options_args
-        new_options, new_args = self.option_parser.get_result (values)
-        if method == 'subprocess':
-            process = multiprocessing.Process(target=FunctionWrapper(self.option_parser.runner,
-                                                                     self.log_queue), 
-                                              args=(self.option_parser, new_options, new_args))
-            process.start ()
-            return process
-        elif method == 'subcommand':
-            if multiprocessing is None:
-                print('Using multiprocessing package is disabled.')
-                if sys.version[:3]<='2.5':
-                    print('Python 2.4, 2.5 users should install multiprocessing package from http://code.google.com/p/python-multiprocessing/')
-            if show_info[0]:
-                print('Live session output is visible only in terminal.')
-                print('Wait for the runner process to finish..')
-                show_info[0] = False
-            self.option_parser.save_options(new_options, new_args)
-            cmd_lst = []
-            cmd_prefix = getattr(new_options, 'runner_subcommand', sys.executable)
-            if cmd_prefix:
-                cmd_lst.append(cmd_prefix)
-            cmd_lst.append (sys.argv[0])
-            cmd_lst.append ('--no-gui')
-            cmd = ' '.join(cmd_lst)
-            print('Executing command:', cmd)
-            process = subprocess.Popen (cmd, shell=True,
-                                        #stdout=std_subprocess.PIPE,
-                                        stderr=std_subprocess.STDOUT)
-            return process
-        else:
-            raise NotImplementedError (repr(method))
-
-    def _cleanup_process (self, process, method):
-        if process is None:
-            return
-        if method == 'subprocess':
-            if process.exitcode is None:
-                pid = process.pid
-                print('Runner %s (PID=%s) still running, trying to terminate' % (method, pid))
-                process.terminate()
-                process.join()
-            print('Runner %s has finished with exitcode=%s' % (method,  pretty_signal(process.exitcode)))
-        elif method == 'subcommand':
-            s = process.wait()
-            if os.name == 'nt':
-                print('Runner %s has finished with returncode=%s' % (method,  pretty_signal (s)))
-            else:
-                pid = process.pid
-                print('Runner %s (PID=%s) has finished with returncode=%s' % (method, pid, pretty_signal(s)))
-        else:
-            raise NotImplementedError (repr(method))
-
-    def _interrupt_process (self, process, method):
-        if method == 'subprocess':
-            if process.is_alive():
-                pid = process.pid
-                os_kill(pid, signal.SIGINT)
-                print()
-                print('SIGINT signal has been sent to runner %s (PID=%s)' % (method, pid))
-        elif method == 'subcommand':
-            if process.poll () is None:
-                if os.name == 'nt':
-                    process.kill(True, s=signal.SIGINT)
-                    print()
-                    print('SIGINT signal has been sent to runner %s' % (method))
-                else:
-                    pid = process.pid
-                    os_kill(pid, signal.SIGINT)
-                    print()
-                    print('SIGINT signal has been sent to runner %s (PID=%s)' % (method, pid))
-        else:
-            raise NotImplementedError (repr(method))
-
-    def _terminate_process (self, process, method):
-        if method == 'subprocess':
-            if prosess.is_alive():
-                print()
-                print('Terminating runner %s' % (method))
-                process.terminate()
-        elif method == 'subcommand':
-            if process.poll() is None:
-                if sys.version[:3]>='2.6':
-                    print()
-                    print('Terminating runner %s' % (method))
-                    process.terminate ()
-                else:
-                    if os.name == 'nt':
-                        process.kill (True, s = signal.SIGTERM)
-                    else:
-                        os_kill (process.pid, signal.SIGTERM)
-                    print()
-                    print('SIGTERM signal has been sent to runner %s' % (method))
-        else:
-            raise NotImplementedError (repr(method))
-
-    def start_runner (self):
-        if not self.process_list:
-            self.exit_b.SetLabel('Stop')
-            self.timer.Start(100)
-        self.option_parser.run_method = self.run_method
-        process = self._start_process(self.run_method)
-        pid = process.pid
-        print()
-        print('Runner %s (PID=%s) has been started' % (self.run_method, pid))
-        self.process_list.append((process, self.run_method))
-
-    def cleanup_runner (self):
-        if not self.process_list:
-            self.timer.Stop()
-            self.exit_b.SetLabel('Exit')
-
-    def interrupt_runner (self):
-        if self.process_list:
-            process, run_method = self.process_list[-1]
-            del self.process_list[-1]
-            self._interrupt_process(process, run_method)
-            self._cleanup_process(process, run_method)
-        self.cleanup_runner()
-
-    def terminate_runner(self):
-        if self.process_list:
-            process, run_method = self.process_list[-1]
-            del self.process_list[-1]
-            self._terminate_process(process, run_method)
-            self._cleanup_process(process, run_method)
-        self.cleanup_runner()
-
-    def OnExit(self, event):
-        if self.exit_b.GetLabel() == 'Stop':
-            self.interrupt_runner()
-            return
-
-        while self.process_list:
-            self.terminate_runner()
-
-        try:
-            values, args = self.option_parser.parse_options_args
-            self.set_result()
-            values, args = self.option_parser.get_result(values)
-            #self.option_parser.save_options(values, args)
-        except optparse.OptionValueError as msg:
-            print('Ignoring %s' % (msg))
-            pass
-
-        self.restore_std_streams()
-        self.Close(True)
-        sys.exit(0)
-
-    def OnRun(self, event):
-        self.start_runner()
-
-    def OnCloseWindow (self, event):
-        while self.process_list:
-            self.terminate_runner()
-        self.restore_std_streams()
-        self.result = None
-        self.Destroy()
-
-    def OnSelectPath(self, event):
-        option, ctrl = self.browse_option_map[event.GetId()]
-        path = os.path.abspath(ctrl.Value)
-        if option.type == 'file':
-            if os.path.isdir (path):
-                default_file = ''
-                default_dir = path
-            else:
-                default_file = path
-                default_dir =os.path.dirname(path)
-            dlg = wx.FileDialog(self,
-                                message = 'Select file for %s' % (option.get_opt_string()),
-                                defaultDir = default_dir, defaultFile=default_file)
-        elif option.type == 'directory':
-            if os.path.isfile(path):
-                path = os.path.dirname (path)
-            dlg = wx.DirDialog(self,
-                               message = 'Select directory for %s' % (option.get_opt_string()),
-                               defaultPath = path)
-        else:
-            raise NotImplementedError(repr(option.type))
-        if dlg.ShowModal() != wx.ID_OK:
-            return
-        cwd = os.path.abspath(os.getcwd())
-        value = dlg.GetPath()
-        if value.startswith(cwd):
-            value = value[len(cwd)+1:]
-        ctrl.Value = value
-
-    def set_result(self):
-        option_values = {}
-        for option, ctrl in self.option_controls.items():
-            value = getattr(ctrl,'Value',None)
-            if value != '' and value is not None:
-                value = get_fixed_option_value(option, value)
-                option_values[option] = value
-            elif value is not None:
-                option_values[option] = None
-        args_buff = str(self.args_ctrl.GetValue())
-        args =  splitcommandline(args_buff)
-        self.option_parser.result = option_values, args
-
-    def put_result(self):
-        option_values, args = self.option_parser.result
-        for option, ctrl in self.option_controls.items():
-            value = option_values.get(option)
-            if value is not None:
-                ctrl.SetValue(value)
-        self.args_ctrl.SetValue(' '.join(args))
-
-
-class UserCancelledError(Exception):
-    pass
-
-
-def check_file(option, opt, value):
-    try:
-        value = str(value)
-    except ValueError:
-        raise OptionValueError(
-            _("option %s: invalid %s value: %r") % (opt, what, value))
-    #if value and not os.path.isfile(value):
-    #    print 'Warning: path %r is not a file' % (value)
-    return value
-
-
-def check_directory(option, opt, value):
-    try:
-        value = str(value)
-    except ValueError:
-        raise OptionValueError(
-            _("option %s: invalid %s value: %r") % (opt, what, value))
-    #if value and not os.path.isdir(value):
-    #    print 'Warning: path %r is not a directory' % (value)
-    return value
-
-
-class Option(optparse.Option):
-    """Extends optparse.Option with file, directory and multiline types.
-    """
-    _SUPER = optparse.Option
-    TYPES = _SUPER.TYPES + ('file', 'directory', 'multiline')
-    TYPE_CHECKER = _SUPER.TYPE_CHECKER.copy()
-    TYPE_CHECKER.update (file=check_file, directory=check_directory)
-
-
-
-class OptionParser(optparse.OptionParser):
-    """Extends optparse.OptionParser with GUI support.
-    """
-    _SUPER = optparse.OptionParser
-    """Holds base class.
-    """
-    
-    def __init__(self, *args, **kwargs):
-        if 'option_class' not in kwargs:
-            kwargs['option_class'] = Option
-        self.runner = None
-        self._SUPER.__init__( self, *args, **kwargs )
-
-    def save_option_value (self, dest, value):
-        return self._set_dest_value (dest, value)
-
-    def _set_dest_value(self, dest, value, old_cwd = None):
-        if value is None:
-            return
-        option = ([option for option in self._get_all_options () if option.dest == dest] + [None])[0]
-        if option is None:
-            print('Could not find option with dest=%r for setting %r (dest not specified for option).' % (dest, value))
-        else:
-            if option.type in ['file', 'directory']:
-                if old_cwd is not None:
-                    value = os.path.join(old_cwd, value)
-                else:
-                    value = os.path.abspath(value)
-                cwd = os.getcwd()
-                if value.startswith(cwd):
-                    value = value[len(cwd)+1:]
-            if value == 'none':
-                value = None
-            else:
-                try:
-                    option.check_value(option.dest, str(value))
-                except optparse.OptionValueError as msg:
-                    print('_set_dest_value: ignoring %s' % msg)
-                    return
-                option.default = value
-        if value is None:
-            try:
-                del self.defaults[dest]
-            except KeyError:
-                pass
-        else:
-            self.defaults[dest] = value
-
-    def get_history_file(self):
-        import hashlib
-        script_history = os.path.join(os.environ.get('HOME',''), '.optparse_history', 
-                                      os.path.basename(sys.argv[0]) + hashlib.md5(os.path.abspath(sys.argv[0])).hexdigest())        
-        return script_history
-
-
-    def save_options (self, values, args):
-        script_history = self.get_history_file()
-        if debug>1:
-            print('Saving options to', script_history)
-        cwd = os.path.abspath(os.getcwd())
-        dirname = os.path.dirname(script_history)
-        if not os.path.isdir (dirname):
-            os.makedirs(dirname)
-
-        tmp_file = tempfile.mktemp()
-            
-        f = open(tmp_file, 'w')
-        f.write ('#cwd:%r\n' % (cwd))
-        f.write ('#args:%r\n' % (args,))
-        for option in self._get_all_options():
-            if option.dest:
-                value = getattr(values, option.dest, None)
-                if value is not None:
-                    f.write('%s: %r\n' % (option.dest, value))
-        f.close()        
-
-        shutil.move(tmp_file, script_history)
-        
-    def load_options(self):
-        script_history = self.get_history_file ()
-        if debug>1:
-            print('Loading options from',script_history)
-        h_args = None
-        h_cwd = None
-        cwd = os.path.abspath(os.getcwd())
-        if os.path.isfile(script_history):
-            f = open (script_history)
-            for line in f.readlines():
-                try:
-                    dest, value = line.split(':', 1)
-                    value = eval(value)
-                except Exception as msg:
-                    print('optparse_gui.load_options: failed parsing options file, line=%r: %s' % (line, msg))
-                    continue
-                if dest == '#args':
-                    h_args = value
-                elif dest == '#cwd':
-                    h_cwd = value
-                else:
-                    self._set_dest_value(dest, value, h_cwd)
-            f.close()        
-        return h_args
-
-    def parse_args( self, args = None, values = None ):
-        '''Parse the command-line options.
-        '''
-        # load options history
-        h_args = self.load_options()
-
-        no_gui = '--no-gui' in sys.argv
-        if no_gui:
-            sys.argv.remove('--no-gui')
-        # preprocess command line arguments and set to defaults
-        pp_option_values, pp_args = self._SUPER.parse_args(self, args, values)
-
-        if no_gui:
-            self.save_options(pp_option_values, pp_args)
-            return pp_option_values, pp_args
-
-        for dest, value in pp_option_values.__dict__.items():
-            self._set_dest_value(dest, value)
-
-        self.parse_options_args = (values, args)
-
-        app = wx.App(redirect=False)
-        try:
-            dlg = OptparseFrame(self)
-        except Exception as msg:
-            traceback.print_exc(file=sys.stdout)
-            raise
-        if pp_args:
-            dlg.args_ctrl.Value = ' '.join(pp_args)
-        elif h_args is not None:
-            dlg.args_ctrl.Value = ' '.join(h_args)
-        dlg.Show (True)
-        app.MainLoop()
-
-        if self.result is None:
-            print('User has cancelled, exiting.')
-            sys.exit(0)
-        
-        values, args = self.get_result(values)
-        self.save_options(values, args)
-
-        return values, args
-
-    def error( self, msg ):
-        print("AN ERROR OCCURRED WITH A MESSAGE: %s" % (msg))
-        #app = wx.GetApp()
-        #print app, msg
-        #if app is None:    
-        #    app = wx.App( False )
-        #wx.MessageDialog( None, msg, 'Error!', wx.ICON_ERROR ).ShowModal()
-        return self._SUPER.error( self, msg )
-
-    def get_result(self, values):
-        if values is None:
-            values = self.get_default_values()
-            
-        option_values, args = self.result
-         
-        for option, value in option_values.items():
-            if option.action == 'store_true':
-                if isinstance(value, bool):
-                    setattr( values, option.dest, value )
-                continue
-            if option.action == 'store_false':
-                if isinstance(value, bool):
-                    setattr( values, option.dest, not value )
-                continue
-            
-            if option.takes_value() is False:
-                value = None
-
-            option.process( option, value, values, self )
-        return values, args
-
-
-################################################################################
-
-
-def sample_parse_args():
-    usage = "usage: %prog [options] args"
-    if 1 == len( sys.argv ):
-        option_parser_class = OptionParser
-    else:
-        option_parser_class = optparse.OptionParser
-        
-    parser = option_parser_class( usage = usage, version='0.1' )
-    parser.add_option("-f", "--file", dest="filename", default = r'c:\1.txt',
-                      help="read data from FILENAME")
-    parser.add_option("-t", "--text", dest="text", default = r'c:\1.txt',
-                      help="MULTILINE text field")
-    parser.add_option("-a", "--action", dest="action",
-                      choices = ['delete', 'copy', 'move'],
-                      help="Which action do you wish to take?!")
-    parser.add_option("-n", "--number", dest="number", default = 23,
-                      type = 'int',
-                      help="Just a number")
-    parser.add_option("-v", "--verbose",
-                      action="store_true", dest="verbose",
-                      help = 'To be or not to be? ( verbose )' )
-    
-    (options, args) = parser.parse_args()
-    return options, args
-
-
-def sample_parse_args_issue1():
-    usage = "usage: %prog [options] args"
-    option_parser_class = OptionParser
-        
-    parser = option_parser_class( usage = usage, version='0.1' )
-    parser.add_option("-f", "--file", dest="filename", default = r'c:\1.txt',
-                      type = 'file',
-                      help="read data from FILENAME")
-    parser.add_option("-t", "--text", dest="text", default = r'c:\1.txt',
-                      type = 'multiline',
-                      help="MULTILINE text field")
-    parser.add_option("-a", "--action", dest="action",
-                      choices = ['delete', 'copy', 'move'],
-                      help="Which action do you wish to take?!")
-    parser.add_option("-n", "--number", dest="number", default = 23,
-                      type = 'int',
-                      help="Just a number")
-    parser.add_option("-v", "--verbose",
-                      action="store_true", dest="verbose",
-                      help = 'To be or not to be? ( verbose )' )
-
-    group = optparse.OptionGroup(parser, "Dangerous Options",
-                        "Caution: use these options at your own risk.  "
-                        "It is believed that some of them bite.")
-    group.add_option("-g", action="store_true", help="Group option.",
-                     )
-    parser.add_option_group(group)
-
-    (options, args) = parser.parse_args()
-    return options, args
-
-
-def main():
-    options, args = sample_parse_args_issue1()
-    print('args: %s' % repr( args ))
-    print('options: %s' % repr( options ))
-
-
-if '__main__' == __name__:
-    main()


=====================================
libtiff/script_options.py
=====================================
@@ -1,17 +1,8 @@
-
-
 __all__ = ['set_formatter', 'set_info_options', 'set_convert_options']
 
-import os
 from optparse import NO_DEFAULT
 from optparse import TitledHelpFormatter
 
-try:
-    import wx  # noqa: F401
-    have_wx = True
-except ImportError:
-    have_wx = False
-
 
 class MyHelpFormatter(TitledHelpFormatter):
 
@@ -60,20 +51,13 @@ def set_formatter(parser):
 
 def set_convert_options(parser):
     set_formatter(parser)
-    if os.name == 'posix':
-        try:
-            import matplotlib
-            matplotlib.use('GTkAgg')
-            parser.run_methods = ['subcommand']
-        except ImportError:
-            pass
     parser.set_usage('%prog [options] -i INPUTPATH [-o OUTPUTPATH]')
     parser.set_description('Convert INPUTPATH to OUTPUTPATH.')
     parser.add_option('--input-path', '-i',
-                      type='file' if have_wx else str, metavar='INPUTPATH',
+                      type=str, metavar='INPUTPATH',
                       help='Specify INPUTPATH.')
     parser.add_option('--output-path', '-o',
-                      type='file' if have_wx else str, metavar='OUTPUTPATH',
+                      type=str, metavar='OUTPUTPATH',
                       help='Specify OUTPUTPATH.')
     parser.add_option('--compression',
                       type='choice', default='none',
@@ -89,17 +73,10 @@ def set_convert_options(parser):
 
 def set_info_options(parser):
     set_formatter(parser)
-    if os.name == 'posix':
-        try:
-            import matplotlib
-            matplotlib.use('GTkAgg')
-            parser.run_methods = ['subcommand']
-        except ImportError:
-            pass
     parser.set_usage('%prog [options] -i INPUTPATH')
     parser.set_description('Show INPUTPATHs information.')
     parser.add_option('--input-path', '-i',
-                      type='file' if have_wx else str, metavar='INPUTPATH',
+                      type=str, metavar='INPUTPATH',
                       help='Specify INPUTPATH.')
     parser.add_option('--memory-usage',
                       action='store_true', default=False,


=====================================
libtiff/scripts/convert.py
=====================================
@@ -95,10 +95,7 @@ def runner(parser, options, args):
 
 
 def main():
-    try:
-        from libtiff.optparse_gui import OptionParser
-    except ImportError:
-        from optparse import OptionParser
+    from optparse import OptionParser
     from libtiff.script_options import set_convert_options
     parser = OptionParser()
 


=====================================
libtiff/scripts/info.py
=====================================
@@ -69,10 +69,7 @@ def runner(parser, options, args):
 
 
 def main():
-    try:
-        from libtiff.optparse_gui import OptionParser
-    except ImportError:
-        from optparse import OptionParser
+    from optparse import OptionParser
     from libtiff.script_options import set_info_options
     from libtiff.utils import Options
     parser = OptionParser()


=====================================
libtiff/test_bittools.py
=====================================
@@ -39,7 +39,7 @@ def test_wordbits():
             assert word == arr[0], repr((width, word, arr[0], bstr, dtype))
         bittools.setword(arr2, 0, width, word)
         assert bittools.getword(arr2, 0, width)[0] == word
-        assert tobinary(arr2)[:width] == bstr[:width],\
+        assert tobinary(arr2)[:width] == bstr[:width], \
             repr((tobinary(arr2)[:width], bstr[:width]))
 
 


=====================================
libtiff/tests/test_lzw.py
=====================================
@@ -26,10 +26,10 @@ from libtiff.tif_lzw import encode as c_encode, decode as c_decode
 def test_encode():
     for arr in [
             numpy.array([7, 7, 7, 8, 8, 7, 7, 6, 6], numpy.uint8),
-            numpy.array(list(range(400000)), numpy.uint8),
+            numpy.array(list(range(400000))).astype(numpy.uint8),
             numpy.array([1, 3, 7, 15, 31, 63], numpy.uint8)]:
 
         rarr = c_encode(arr)
         arr2 = c_decode(rarr, arr.nbytes)
-        assert arr2.nbytes == arr.nbytes and (arr2 == arr).all(),\
+        assert arr2.nbytes == arr.nbytes and (arr2 == arr).all(), \
             repr((arr2, arr))


=====================================
libtiff/tests/test_tiff_file.py
=====================================
@@ -47,7 +47,7 @@ def test_issue19():
 
     # size = 1024*63  # almost 4GB, test takes about 60 seconds but succeeds
     image = ones((size, size), dtype=uint8)
-    print('image size:', image.nbytes / 1024**2, 'MB')
+    # print('image size:', image.nbytes / 1024**2, 'MB')
     fn = mktemp('issue19.tif')
     tif = TIFFimage(image)
     try:


=====================================
libtiff/tests/test_tiff_image.py
=====================================
@@ -4,7 +4,7 @@ import atexit
 from tempfile import mktemp
 from numpy import (uint8, uint16, uint32, uint64, int8, int16, int32,
                    int64, float32, float64, array, zeros, dtype,
-                   complex64, complex128)
+                   complex64, complex128, issubdtype, integer)
 from libtiff import TIFFfile, TIFFimage, TIFF
 
 import pytest
@@ -34,8 +34,6 @@ def test_rw_rgb():
     data, names = tif.get_samples()
     tif.close()
     atexit.register(os.remove, fn)
-    print(image)
-    print(data)
 
     assert itype == data[0].dtype, repr((itype, data[0].dtype))
     assert (image['r'] == data[0]).all()
@@ -67,9 +65,11 @@ def test_write_read(compression, itype):
 @pytest.mark.skipif(sys.platform == "darwin", reason="OSX can't resize mmap")
 @pytest.mark.parametrize("itype", SUPPORTED_DTYPES)
 def test_write_lzw(itype):
-    # image = array([[1,2,3], [4,5,6]], itype)
-    image = array([list(range(10000))], itype)
-    # image = array([[0]*14000], itype)
+    if issubdtype(itype, integer):
+        # avoid overflow failure from numpy for integer types
+        image = array([list(range(10000))]).astype(itype)
+    else:
+        image = array([list(range(10000))], itype)
     fn = mktemp('.tif')
     tif = TIFFimage(image)
     tif.write_file(fn, compression='lzw')
@@ -83,8 +83,8 @@ def test_write_lzw(itype):
     atexit.register(os.remove, fn)
     for i in range(image.size):
         if image.flat[i] != image2.flat[i]:
-            print(repr((i, image.flat[i - 5:i + 5].view(dtype=uint8),
-                        image2.flat[i - 5:i + 5].view(dtype=uint8))))
+            # print(repr((i, image.flat[i - 5:i + 5].view(dtype=uint8),
+            #            image2.flat[i - 5:i + 5].view(dtype=uint8))))
             break
 
     assert image.dtype == image2.dtype


=====================================
libtiff/tiff_file.py
=====================================
@@ -237,7 +237,7 @@ class TIFFfile(TiffBase):
             bytes = type2bytes.get(typ)
             if dtype is None or bytes is None:
                 warnings.warn('incomplete info for type=%r [%r]: dtype=%s, bytes=%s\n' % (
-                    typ, ntyp, dtype, bytes))
+                    typ, ntyp, dtype, bytes), stacklevel=2)
                 return
         return self.data[offset:offset + bytes * count].view(dtype=dtype)
 


=====================================
libtiff/tiff_h_4_6_0.py
=====================================
@@ -0,0 +1,629 @@
+TIFF_VERSION_CLASSIC = 42
+TIFF_VERSION_BIG = 43
+TIFF_BIGENDIAN = 19789
+TIFF_LITTLEENDIAN = 18761
+MDI_LITTLEENDIAN = 20549
+MDI_BIGENDIAN = 17744
+TIFFTAG_SUBFILETYPE = 254
+FILETYPE_REDUCEDIMAGE = 1
+FILETYPE_PAGE = 2
+FILETYPE_MASK = 4
+TIFFTAG_OSUBFILETYPE = 255
+OFILETYPE_IMAGE = 1
+OFILETYPE_REDUCEDIMAGE = 2
+OFILETYPE_PAGE = 3
+TIFFTAG_IMAGEWIDTH = 256
+TIFFTAG_IMAGELENGTH = 257
+TIFFTAG_BITSPERSAMPLE = 258
+TIFFTAG_COMPRESSION = 259
+COMPRESSION_NONE = 1
+COMPRESSION_CCITTRLE = 2
+COMPRESSION_CCITTFAX3 = 3
+COMPRESSION_CCITT_T4 = 3
+COMPRESSION_CCITTFAX4 = 4
+COMPRESSION_CCITT_T6 = 4
+COMPRESSION_LZW = 5
+COMPRESSION_OJPEG = 6
+COMPRESSION_JPEG = 7
+COMPRESSION_T85 = 9
+COMPRESSION_T43 = 10
+COMPRESSION_NEXT = 32766
+COMPRESSION_CCITTRLEW = 32771
+COMPRESSION_PACKBITS = 32773
+COMPRESSION_THUNDERSCAN = 32809
+COMPRESSION_IT8CTPAD = 32895
+COMPRESSION_IT8LW = 32896
+COMPRESSION_IT8MP = 32897
+COMPRESSION_IT8BL = 32898
+COMPRESSION_PIXARFILM = 32908
+COMPRESSION_PIXARLOG = 32909
+COMPRESSION_DEFLATE = 32946
+COMPRESSION_ADOBE_DEFLATE = 8
+COMPRESSION_DCS = 32947
+COMPRESSION_JBIG = 34661
+COMPRESSION_SGILOG = 34676
+COMPRESSION_SGILOG24 = 34677
+COMPRESSION_JP2000 = 34712
+COMPRESSION_LERC = 34887
+COMPRESSION_LZMA = 34925
+COMPRESSION_ZSTD = 50000
+COMPRESSION_WEBP = 50001
+COMPRESSION_JXL = 50002
+TIFFTAG_PHOTOMETRIC = 262
+PHOTOMETRIC_MINISWHITE = 0
+PHOTOMETRIC_MINISBLACK = 1
+PHOTOMETRIC_RGB = 2
+PHOTOMETRIC_PALETTE = 3
+PHOTOMETRIC_MASK = 4
+PHOTOMETRIC_SEPARATED = 5
+PHOTOMETRIC_YCBCR = 6
+PHOTOMETRIC_CIELAB = 8
+PHOTOMETRIC_ICCLAB = 9
+PHOTOMETRIC_ITULAB = 10
+PHOTOMETRIC_CFA = 32803
+PHOTOMETRIC_LOGL = 32844
+PHOTOMETRIC_LOGLUV = 32845
+TIFFTAG_THRESHHOLDING = 263
+THRESHHOLD_BILEVEL = 1
+THRESHHOLD_HALFTONE = 2
+THRESHHOLD_ERRORDIFFUSE = 3
+TIFFTAG_CELLWIDTH = 264
+TIFFTAG_CELLLENGTH = 265
+TIFFTAG_FILLORDER = 266
+FILLORDER_MSB2LSB = 1
+FILLORDER_LSB2MSB = 2
+TIFFTAG_DOCUMENTNAME = 269
+TIFFTAG_IMAGEDESCRIPTION = 270
+TIFFTAG_MAKE = 271
+TIFFTAG_MODEL = 272
+TIFFTAG_STRIPOFFSETS = 273
+TIFFTAG_ORIENTATION = 274
+ORIENTATION_TOPLEFT = 1
+ORIENTATION_TOPRIGHT = 2
+ORIENTATION_BOTRIGHT = 3
+ORIENTATION_BOTLEFT = 4
+ORIENTATION_LEFTTOP = 5
+ORIENTATION_RIGHTTOP = 6
+ORIENTATION_RIGHTBOT = 7
+ORIENTATION_LEFTBOT = 8
+TIFFTAG_SAMPLESPERPIXEL = 277
+TIFFTAG_ROWSPERSTRIP = 278
+TIFFTAG_STRIPBYTECOUNTS = 279
+TIFFTAG_MINSAMPLEVALUE = 280
+TIFFTAG_MAXSAMPLEVALUE = 281
+TIFFTAG_XRESOLUTION = 282
+TIFFTAG_YRESOLUTION = 283
+TIFFTAG_PLANARCONFIG = 284
+PLANARCONFIG_CONTIG = 1
+PLANARCONFIG_SEPARATE = 2
+TIFFTAG_PAGENAME = 285
+TIFFTAG_XPOSITION = 286
+TIFFTAG_YPOSITION = 287
+TIFFTAG_FREEOFFSETS = 288
+TIFFTAG_FREEBYTECOUNTS = 289
+TIFFTAG_GRAYRESPONSEUNIT = 290
+GRAYRESPONSEUNIT_10S = 1
+GRAYRESPONSEUNIT_100S = 2
+GRAYRESPONSEUNIT_1000S = 3
+GRAYRESPONSEUNIT_10000S = 4
+GRAYRESPONSEUNIT_100000S = 5
+TIFFTAG_GRAYRESPONSECURVE = 291
+TIFFTAG_GROUP3OPTIONS = 292
+TIFFTAG_T4OPTIONS = 292
+GROUP3OPT_2DENCODING = 1
+GROUP3OPT_UNCOMPRESSED = 2
+GROUP3OPT_FILLBITS = 4
+TIFFTAG_GROUP4OPTIONS = 293
+TIFFTAG_T6OPTIONS = 293
+GROUP4OPT_UNCOMPRESSED = 2
+TIFFTAG_RESOLUTIONUNIT = 296
+RESUNIT_NONE = 1
+RESUNIT_INCH = 2
+RESUNIT_CENTIMETER = 3
+TIFFTAG_PAGENUMBER = 297
+TIFFTAG_COLORRESPONSEUNIT = 300
+COLORRESPONSEUNIT_10S = 1
+COLORRESPONSEUNIT_100S = 2
+COLORRESPONSEUNIT_1000S = 3
+COLORRESPONSEUNIT_10000S = 4
+COLORRESPONSEUNIT_100000S = 5
+TIFFTAG_TRANSFERFUNCTION = 301
+TIFFTAG_SOFTWARE = 305
+TIFFTAG_DATETIME = 306
+TIFFTAG_ARTIST = 315
+TIFFTAG_HOSTCOMPUTER = 316
+TIFFTAG_PREDICTOR = 317
+PREDICTOR_NONE = 1
+PREDICTOR_HORIZONTAL = 2
+PREDICTOR_FLOATINGPOINT = 3
+TIFFTAG_WHITEPOINT = 318
+TIFFTAG_PRIMARYCHROMATICITIES = 319
+TIFFTAG_COLORMAP = 320
+TIFFTAG_HALFTONEHINTS = 321
+TIFFTAG_TILEWIDTH = 322
+TIFFTAG_TILELENGTH = 323
+TIFFTAG_TILEOFFSETS = 324
+TIFFTAG_TILEBYTECOUNTS = 325
+TIFFTAG_BADFAXLINES = 326
+TIFFTAG_CLEANFAXDATA = 327
+CLEANFAXDATA_CLEAN = 0
+CLEANFAXDATA_REGENERATED = 1
+CLEANFAXDATA_UNCLEAN = 2
+TIFFTAG_CONSECUTIVEBADFAXLINES = 328
+TIFFTAG_SUBIFD = 330
+TIFFTAG_INKSET = 332
+INKSET_CMYK = 1
+INKSET_MULTIINK = 2
+TIFFTAG_INKNAMES = 333
+TIFFTAG_NUMBEROFINKS = 334
+TIFFTAG_DOTRANGE = 336
+TIFFTAG_TARGETPRINTER = 337
+TIFFTAG_EXTRASAMPLES = 338
+EXTRASAMPLE_UNSPECIFIED = 0
+EXTRASAMPLE_ASSOCALPHA = 1
+EXTRASAMPLE_UNASSALPHA = 2
+TIFFTAG_SAMPLEFORMAT = 339
+SAMPLEFORMAT_UINT = 1
+SAMPLEFORMAT_INT = 2
+SAMPLEFORMAT_IEEEFP = 3
+SAMPLEFORMAT_VOID = 4
+SAMPLEFORMAT_COMPLEXINT = 5
+SAMPLEFORMAT_COMPLEXIEEEFP = 6
+TIFFTAG_SMINSAMPLEVALUE = 340
+TIFFTAG_SMAXSAMPLEVALUE = 341
+TIFFTAG_CLIPPATH = 343
+TIFFTAG_XCLIPPATHUNITS = 344
+TIFFTAG_YCLIPPATHUNITS = 345
+TIFFTAG_INDEXED = 346
+TIFFTAG_JPEGTABLES = 347
+TIFFTAG_OPIPROXY = 351
+TIFFTAG_GLOBALPARAMETERSIFD = 400
+TIFFTAG_PROFILETYPE = 401
+PROFILETYPE_UNSPECIFIED = 0
+PROFILETYPE_G3_FAX = 1
+TIFFTAG_FAXPROFILE = 402
+FAXPROFILE_S = 1
+FAXPROFILE_F = 2
+FAXPROFILE_J = 3
+FAXPROFILE_C = 4
+FAXPROFILE_L = 5
+FAXPROFILE_M = 6
+TIFFTAG_CODINGMETHODS = 403
+CODINGMETHODS_T4_1D = 2
+CODINGMETHODS_T4_2D = 4
+CODINGMETHODS_T6 = 8
+CODINGMETHODS_T85 = 16
+CODINGMETHODS_T42 = 32
+CODINGMETHODS_T43 = 64
+TIFFTAG_VERSIONYEAR = 404
+TIFFTAG_MODENUMBER = 405
+TIFFTAG_DECODE = 433
+TIFFTAG_IMAGEBASECOLOR = 434
+TIFFTAG_T82OPTIONS = 435
+TIFFTAG_JPEGPROC = 512
+JPEGPROC_BASELINE = 1
+JPEGPROC_LOSSLESS = 14
+TIFFTAG_JPEGIFOFFSET = 513
+TIFFTAG_JPEGIFBYTECOUNT = 514
+TIFFTAG_JPEGRESTARTINTERVAL = 515
+TIFFTAG_JPEGLOSSLESSPREDICTORS = 517
+TIFFTAG_JPEGPOINTTRANSFORM = 518
+TIFFTAG_JPEGQTABLES = 519
+TIFFTAG_JPEGDCTABLES = 520
+TIFFTAG_JPEGACTABLES = 521
+TIFFTAG_YCBCRCOEFFICIENTS = 529
+TIFFTAG_YCBCRSUBSAMPLING = 530
+TIFFTAG_YCBCRPOSITIONING = 531
+YCBCRPOSITION_CENTERED = 1
+YCBCRPOSITION_COSITED = 2
+TIFFTAG_REFERENCEBLACKWHITE = 532
+TIFFTAG_STRIPROWCOUNTS = 559
+TIFFTAG_XMLPACKET = 700
+TIFFTAG_OPIIMAGEID = 32781
+TIFFTAG_TIFFANNOTATIONDATA = 32932
+TIFFTAG_REFPTS = 32953
+TIFFTAG_REGIONTACKPOINT = 32954
+TIFFTAG_REGIONWARPCORNERS = 32955
+TIFFTAG_REGIONAFFINE = 32956
+TIFFTAG_MATTEING = 32995
+TIFFTAG_DATATYPE = 32996
+TIFFTAG_IMAGEDEPTH = 32997
+TIFFTAG_TILEDEPTH = 32998
+TIFFTAG_PIXAR_IMAGEFULLWIDTH = 33300
+TIFFTAG_PIXAR_IMAGEFULLLENGTH = 33301
+TIFFTAG_PIXAR_TEXTUREFORMAT = 33302
+TIFFTAG_PIXAR_WRAPMODES = 33303
+TIFFTAG_PIXAR_FOVCOT = 33304
+TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN = 33305
+TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA = 33306
+TIFFTAG_WRITERSERIALNUMBER = 33405
+TIFFTAG_CFAREPEATPATTERNDIM = 33421
+TIFFTAG_CFAPATTERN = 33422
+TIFFTAG_BATTERYLEVEL = 33423
+TIFFTAG_COPYRIGHT = 33432
+TIFFTAG_MD_FILETAG = 33445
+TIFFTAG_MD_SCALEPIXEL = 33446
+TIFFTAG_MD_COLORTABLE = 33447
+TIFFTAG_MD_LABNAME = 33448
+TIFFTAG_MD_SAMPLEINFO = 33449
+TIFFTAG_MD_PREPDATE = 33450
+TIFFTAG_MD_PREPTIME = 33451
+TIFFTAG_MD_FILEUNITS = 33452
+TIFFTAG_RICHTIFFIPTC = 33723
+TIFFTAG_INGR_PACKET_DATA_TAG = 33918
+TIFFTAG_INGR_FLAG_REGISTERS = 33919
+TIFFTAG_IRASB_TRANSORMATION_MATRIX = 33920
+TIFFTAG_MODELTIEPOINTTAG = 33922
+TIFFTAG_IT8SITE = 34016
+TIFFTAG_IT8COLORSEQUENCE = 34017
+TIFFTAG_IT8HEADER = 34018
+TIFFTAG_IT8RASTERPADDING = 34019
+TIFFTAG_IT8BITSPERRUNLENGTH = 34020
+TIFFTAG_IT8BITSPEREXTENDEDRUNLENGTH = 34021
+TIFFTAG_IT8COLORTABLE = 34022
+TIFFTAG_IT8IMAGECOLORINDICATOR = 34023
+TIFFTAG_IT8BKGCOLORINDICATOR = 34024
+TIFFTAG_IT8IMAGECOLORVALUE = 34025
+TIFFTAG_IT8BKGCOLORVALUE = 34026
+TIFFTAG_IT8PIXELINTENSITYRANGE = 34027
+TIFFTAG_IT8TRANSPARENCYINDICATOR = 34028
+TIFFTAG_IT8COLORCHARACTERIZATION = 34029
+TIFFTAG_IT8HCUSAGE = 34030
+TIFFTAG_IT8TRAPINDICATOR = 34031
+TIFFTAG_IT8CMYKEQUIVALENT = 34032
+TIFFTAG_FRAMECOUNT = 34232
+TIFFTAG_MODELTRANSFORMATIONTAG = 34264
+TIFFTAG_PHOTOSHOP = 34377
+TIFFTAG_EXIFIFD = 34665
+TIFFTAG_ICCPROFILE = 34675
+TIFFTAG_IMAGELAYER = 34732
+TIFFTAG_JBIGOPTIONS = 34750
+TIFFTAG_GPSIFD = 34853
+TIFFTAG_FAXRECVPARAMS = 34908
+TIFFTAG_FAXSUBADDRESS = 34909
+TIFFTAG_FAXRECVTIME = 34910
+TIFFTAG_FAXDCS = 34911
+TIFFTAG_STONITS = 37439
+TIFFTAG_FEDEX_EDR = 34929
+TIFFTAG_IMAGESOURCEDATA = 37724
+TIFFTAG_INTEROPERABILITYIFD = 40965
+TIFFTAG_GDAL_METADATA = 42112
+TIFFTAG_GDAL_NODATA = 42113
+TIFFTAG_OCE_SCANJOB_DESCRIPTION = 50215
+TIFFTAG_OCE_APPLICATION_SELECTOR = 50216
+TIFFTAG_OCE_IDENTIFICATION_NUMBER = 50217
+TIFFTAG_OCE_IMAGELOGIC_CHARACTERISTICS = 50218
+TIFFTAG_LERC_PARAMETERS = 50674
+TIFFTAG_DNGVERSION = 50706
+TIFFTAG_DNGBACKWARDVERSION = 50707
+TIFFTAG_UNIQUECAMERAMODEL = 50708
+TIFFTAG_LOCALIZEDCAMERAMODEL = 50709
+TIFFTAG_CFAPLANECOLOR = 50710
+TIFFTAG_CFALAYOUT = 50711
+TIFFTAG_LINEARIZATIONTABLE = 50712
+TIFFTAG_BLACKLEVELREPEATDIM = 50713
+TIFFTAG_BLACKLEVEL = 50714
+TIFFTAG_BLACKLEVELDELTAH = 50715
+TIFFTAG_BLACKLEVELDELTAV = 50716
+TIFFTAG_WHITELEVEL = 50717
+TIFFTAG_DEFAULTSCALE = 50718
+TIFFTAG_DEFAULTCROPORIGIN = 50719
+TIFFTAG_DEFAULTCROPSIZE = 50720
+TIFFTAG_COLORMATRIX1 = 50721
+TIFFTAG_COLORMATRIX2 = 50722
+TIFFTAG_CAMERACALIBRATION1 = 50723
+TIFFTAG_CAMERACALIBRATION2 = 50724
+TIFFTAG_REDUCTIONMATRIX1 = 50725
+TIFFTAG_REDUCTIONMATRIX2 = 50726
+TIFFTAG_ANALOGBALANCE = 50727
+TIFFTAG_ASSHOTNEUTRAL = 50728
+TIFFTAG_ASSHOTWHITEXY = 50729
+TIFFTAG_BASELINEEXPOSURE = 50730
+TIFFTAG_BASELINENOISE = 50731
+TIFFTAG_BASELINESHARPNESS = 50732
+TIFFTAG_BAYERGREENSPLIT = 50733
+TIFFTAG_LINEARRESPONSELIMIT = 50734
+TIFFTAG_CAMERASERIALNUMBER = 50735
+TIFFTAG_LENSINFO = 50736
+TIFFTAG_CHROMABLURRADIUS = 50737
+TIFFTAG_ANTIALIASSTRENGTH = 50738
+TIFFTAG_SHADOWSCALE = 50739
+TIFFTAG_DNGPRIVATEDATA = 50740
+TIFFTAG_MAKERNOTESAFETY = 50741
+TIFFTAG_CALIBRATIONILLUMINANT1 = 50778
+TIFFTAG_CALIBRATIONILLUMINANT2 = 50779
+TIFFTAG_BESTQUALITYSCALE = 50780
+TIFFTAG_RAWDATAUNIQUEID = 50781
+TIFFTAG_ORIGINALRAWFILENAME = 50827
+TIFFTAG_ORIGINALRAWFILEDATA = 50828
+TIFFTAG_ACTIVEAREA = 50829
+TIFFTAG_MASKEDAREAS = 50830
+TIFFTAG_ASSHOTICCPROFILE = 50831
+TIFFTAG_ASSHOTPREPROFILEMATRIX = 50832
+TIFFTAG_CURRENTICCPROFILE = 50833
+TIFFTAG_CURRENTPREPROFILEMATRIX = 50834
+TIFFTAG_COLORIMETRICREFERENCE = 50879
+TIFFTAG_CAMERACALIBRATIONSIGNATURE = 50931
+TIFFTAG_PROFILECALIBRATIONSIGNATURE = 50932
+TIFFTAG_ASSHOTPROFILENAME = 50934
+TIFFTAG_NOISEREDUCTIONAPPLIED = 50935
+TIFFTAG_PROFILENAME = 50936
+TIFFTAG_PROFILEHUESATMAPDIMS = 50937
+TIFFTAG_PROFILEHUESATMAPDATA1 = 50938
+TIFFTAG_PROFILEHUESATMAPDATA2 = 50939
+TIFFTAG_PROFILETONECURVE = 50940
+TIFFTAG_PROFILEEMBEDPOLICY = 50941
+TIFFTAG_PROFILECOPYRIGHT = 50942
+TIFFTAG_FORWARDMATRIX1 = 50964
+TIFFTAG_FORWARDMATRIX2 = 50965
+TIFFTAG_PREVIEWAPPLICATIONNAME = 50966
+TIFFTAG_PREVIEWAPPLICATIONVERSION = 50967
+TIFFTAG_PREVIEWSETTINGSNAME = 50968
+TIFFTAG_PREVIEWSETTINGSDIGEST = 50969
+TIFFTAG_PREVIEWCOLORSPACE = 50970
+TIFFTAG_PREVIEWDATETIME = 50971
+TIFFTAG_RAWIMAGEDIGEST = 50972
+TIFFTAG_ORIGINALRAWFILEDIGEST = 50973
+TIFFTAG_SUBTILEBLOCKSIZE = 50974
+TIFFTAG_ROWINTERLEAVEFACTOR = 50975
+TIFFTAG_PROFILELOOKTABLEDIMS = 50981
+TIFFTAG_PROFILELOOKTABLEDATA = 50982
+TIFFTAG_OPCODELIST1 = 51008
+TIFFTAG_OPCODELIST2 = 51009
+TIFFTAG_OPCODELIST3 = 51022
+TIFFTAG_NOISEPROFILE = 51041
+TIFFTAG_DEFAULTUSERCROP = 51125
+TIFFTAG_DEFAULTBLACKRENDER = 51110
+TIFFTAG_BASELINEEXPOSUREOFFSET = 51109
+TIFFTAG_PROFILELOOKTABLEENCODING = 51108
+TIFFTAG_PROFILEHUESATMAPENCODING = 51107
+TIFFTAG_ORIGINALDEFAULTFINALSIZE = 51089
+TIFFTAG_ORIGINALBESTQUALITYFINALSIZE = 51090
+TIFFTAG_ORIGINALDEFAULTCROPSIZE = 51091
+TIFFTAG_NEWRAWIMAGEDIGEST = 51111
+TIFFTAG_RAWTOPREVIEWGAIN = 51112
+TIFFTAG_DEPTHFORMAT = 51177
+TIFFTAG_DEPTHNEAR = 51178
+TIFFTAG_DEPTHFAR = 51179
+TIFFTAG_DEPTHUNITS = 51180
+TIFFTAG_DEPTHMEASURETYPE = 51181
+TIFFTAG_ENHANCEPARAMS = 51182
+TIFFTAG_PROFILEGAINTABLEMAP = 52525
+TIFFTAG_SEMANTICNAME = 52526
+TIFFTAG_SEMANTICINSTANCEID = 52528
+TIFFTAG_MASKSUBAREA = 52536
+TIFFTAG_RGBTABLES = 52543
+TIFFTAG_CALIBRATIONILLUMINANT3 = 52529
+TIFFTAG_COLORMATRIX3 = 52531
+TIFFTAG_CAMERACALIBRATION3 = 52530
+TIFFTAG_REDUCTIONMATRIX3 = 52538
+TIFFTAG_PROFILEHUESATMAPDATA3 = 52537
+TIFFTAG_FORWARDMATRIX3 = 52532
+TIFFTAG_ILLUMINANTDATA1 = 52533
+TIFFTAG_ILLUMINANTDATA2 = 52534
+TIFFTAG_ILLUMINANTDATA3 = 53535
+TIFFTAG_EP_CFAREPEATPATTERNDIM = 33421
+TIFFTAG_EP_CFAPATTERN = 33422
+TIFFTAG_EP_BATTERYLEVEL = 33423
+TIFFTAG_EP_INTERLACE = 34857
+TIFFTAG_EP_IPTC_NAA = 33723
+TIFFTAG_EP_TIMEZONEOFFSET = 34858
+TIFFTAG_EP_SELFTIMERMODE = 34859
+TIFFTAG_EP_FLASHENERGY = 37387
+TIFFTAG_EP_SPATIALFREQUENCYRESPONSE = 37388
+TIFFTAG_EP_NOISE = 37389
+TIFFTAG_EP_FOCALPLANEXRESOLUTION = 37390
+TIFFTAG_EP_FOCALPLANEYRESOLUTION = 37391
+TIFFTAG_EP_FOCALPLANERESOLUTIONUNIT = 37392
+TIFFTAG_EP_IMAGENUMBER = 37393
+TIFFTAG_EP_SECURITYCLASSIFICATION = 37394
+TIFFTAG_EP_IMAGEHISTORY = 37395
+TIFFTAG_EP_EXPOSUREINDEX = 37397
+TIFFTAG_EP_STANDARDID = 37398
+TIFFTAG_EP_SENSINGMETHOD = 37399
+TIFFTAG_EP_EXPOSURETIME = 33434
+TIFFTAG_EP_FNUMBER = 33437
+TIFFTAG_EP_EXPOSUREPROGRAM = 34850
+TIFFTAG_EP_SPECTRALSENSITIVITY = 34852
+TIFFTAG_EP_ISOSPEEDRATINGS = 34855
+TIFFTAG_EP_OECF = 34856
+TIFFTAG_EP_DATETIMEORIGINAL = 36867
+TIFFTAG_EP_COMPRESSEDBITSPERPIXEL = 37122
+TIFFTAG_EP_SHUTTERSPEEDVALUE = 37377
+TIFFTAG_EP_APERTUREVALUE = 37378
+TIFFTAG_EP_BRIGHTNESSVALUE = 37379
+TIFFTAG_EP_EXPOSUREBIASVALUE = 37380
+TIFFTAG_EP_MAXAPERTUREVALUE = 37381
+TIFFTAG_EP_SUBJECTDISTANCE = 37382
+TIFFTAG_EP_METERINGMODE = 37383
+TIFFTAG_EP_LIGHTSOURCE = 37384
+TIFFTAG_EP_FLASH = 37385
+TIFFTAG_EP_FOCALLENGTH = 37386
+TIFFTAG_EP_SUBJECTLOCATION = 37396
+TIFFTAG_RPCCOEFFICIENT = 50844
+TIFFTAG_ALIAS_LAYER_METADATA = 50784
+TIFFTAG_TIFF_RSID = 50908
+TIFFTAG_GEO_METADATA = 50909
+TIFFTAG_EXTRACAMERAPROFILES = 50933
+TIFFTAG_DCSHUESHIFTVALUES = 65535
+TIFFTAG_FAXMODE = 65536
+FAXMODE_CLASSIC = 0
+FAXMODE_NORTC = 1
+FAXMODE_NOEOL = 2
+FAXMODE_BYTEALIGN = 4
+FAXMODE_WORDALIGN = 8
+FAXMODE_CLASSF = 1
+TIFFTAG_JPEGQUALITY = 65537
+TIFFTAG_JPEGCOLORMODE = 65538
+JPEGCOLORMODE_RAW = 0
+JPEGCOLORMODE_RGB = 1
+TIFFTAG_JPEGTABLESMODE = 65539
+JPEGTABLESMODE_QUANT = 1
+JPEGTABLESMODE_HUFF = 2
+TIFFTAG_FAXFILLFUNC = 65540
+TIFFTAG_PIXARLOGDATAFMT = 65549
+PIXARLOGDATAFMT_8BIT = 0
+PIXARLOGDATAFMT_8BITABGR = 1
+PIXARLOGDATAFMT_11BITLOG = 2
+PIXARLOGDATAFMT_12BITPICIO = 3
+PIXARLOGDATAFMT_16BIT = 4
+PIXARLOGDATAFMT_FLOAT = 5
+TIFFTAG_DCSIMAGERTYPE = 65550
+DCSIMAGERMODEL_M3 = 0
+DCSIMAGERMODEL_M5 = 1
+DCSIMAGERMODEL_M6 = 2
+DCSIMAGERFILTER_IR = 0
+DCSIMAGERFILTER_MONO = 1
+DCSIMAGERFILTER_CFA = 2
+DCSIMAGERFILTER_OTHER = 3
+TIFFTAG_DCSINTERPMODE = 65551
+DCSINTERPMODE_NORMAL = 0
+DCSINTERPMODE_PREVIEW = 1
+TIFFTAG_DCSBALANCEARRAY = 65552
+TIFFTAG_DCSCORRECTMATRIX = 65553
+TIFFTAG_DCSGAMMA = 65554
+TIFFTAG_DCSTOESHOULDERPTS = 65555
+TIFFTAG_DCSCALIBRATIONFD = 65556
+TIFFTAG_ZIPQUALITY = 65557
+TIFFTAG_PIXARLOGQUALITY = 65558
+TIFFTAG_DCSCLIPRECTANGLE = 65559
+TIFFTAG_SGILOGDATAFMT = 65560
+SGILOGDATAFMT_FLOAT = 0
+SGILOGDATAFMT_16BIT = 1
+SGILOGDATAFMT_RAW = 2
+SGILOGDATAFMT_8BIT = 3
+TIFFTAG_SGILOGENCODE = 65561
+SGILOGENCODE_NODITHER = 0
+SGILOGENCODE_RANDITHER = 1
+TIFFTAG_LZMAPRESET = 65562
+TIFFTAG_PERSAMPLE = 65563
+PERSAMPLE_MERGED = 0
+PERSAMPLE_MULTI = 1
+TIFFTAG_ZSTD_LEVEL = 65564
+TIFFTAG_LERC_VERSION = 65565
+LERC_VERSION_2_4 = 4
+TIFFTAG_LERC_ADD_COMPRESSION = 65566
+LERC_ADD_COMPRESSION_NONE = 0
+LERC_ADD_COMPRESSION_DEFLATE = 1
+LERC_ADD_COMPRESSION_ZSTD = 2
+TIFFTAG_LERC_MAXZERROR = 65567
+TIFFTAG_WEBP_LEVEL = 65568
+TIFFTAG_WEBP_LOSSLESS = 65569
+TIFFTAG_WEBP_LOSSLESS_EXACT = 65571
+TIFFTAG_DEFLATE_SUBCODEC = 65570
+DEFLATE_SUBCODEC_ZLIB = 0
+DEFLATE_SUBCODEC_LIBDEFLATE = 1
+EXIFTAG_EXPOSURETIME = 33434
+EXIFTAG_FNUMBER = 33437
+EXIFTAG_EXPOSUREPROGRAM = 34850
+EXIFTAG_SPECTRALSENSITIVITY = 34852
+EXIFTAG_ISOSPEEDRATINGS = 34855
+EXIFTAG_PHOTOGRAPHICSENSITIVITY = 34855
+EXIFTAG_OECF = 34856
+EXIFTAG_EXIFVERSION = 36864
+EXIFTAG_DATETIMEORIGINAL = 36867
+EXIFTAG_DATETIMEDIGITIZED = 36868
+EXIFTAG_COMPONENTSCONFIGURATION = 37121
+EXIFTAG_COMPRESSEDBITSPERPIXEL = 37122
+EXIFTAG_SHUTTERSPEEDVALUE = 37377
+EXIFTAG_APERTUREVALUE = 37378
+EXIFTAG_BRIGHTNESSVALUE = 37379
+EXIFTAG_EXPOSUREBIASVALUE = 37380
+EXIFTAG_MAXAPERTUREVALUE = 37381
+EXIFTAG_SUBJECTDISTANCE = 37382
+EXIFTAG_METERINGMODE = 37383
+EXIFTAG_LIGHTSOURCE = 37384
+EXIFTAG_FLASH = 37385
+EXIFTAG_FOCALLENGTH = 37386
+EXIFTAG_SUBJECTAREA = 37396
+EXIFTAG_MAKERNOTE = 37500
+EXIFTAG_USERCOMMENT = 37510
+EXIFTAG_SUBSECTIME = 37520
+EXIFTAG_SUBSECTIMEORIGINAL = 37521
+EXIFTAG_SUBSECTIMEDIGITIZED = 37522
+EXIFTAG_FLASHPIXVERSION = 40960
+EXIFTAG_COLORSPACE = 40961
+EXIFTAG_PIXELXDIMENSION = 40962
+EXIFTAG_PIXELYDIMENSION = 40963
+EXIFTAG_RELATEDSOUNDFILE = 40964
+EXIFTAG_FLASHENERGY = 41483
+EXIFTAG_SPATIALFREQUENCYRESPONSE = 41484
+EXIFTAG_FOCALPLANEXRESOLUTION = 41486
+EXIFTAG_FOCALPLANEYRESOLUTION = 41487
+EXIFTAG_FOCALPLANERESOLUTIONUNIT = 41488
+EXIFTAG_SUBJECTLOCATION = 41492
+EXIFTAG_EXPOSUREINDEX = 41493
+EXIFTAG_SENSINGMETHOD = 41495
+EXIFTAG_FILESOURCE = 41728
+EXIFTAG_SCENETYPE = 41729
+EXIFTAG_CFAPATTERN = 41730
+EXIFTAG_CUSTOMRENDERED = 41985
+EXIFTAG_EXPOSUREMODE = 41986
+EXIFTAG_WHITEBALANCE = 41987
+EXIFTAG_DIGITALZOOMRATIO = 41988
+EXIFTAG_FOCALLENGTHIN35MMFILM = 41989
+EXIFTAG_SCENECAPTURETYPE = 41990
+EXIFTAG_GAINCONTROL = 41991
+EXIFTAG_CONTRAST = 41992
+EXIFTAG_SATURATION = 41993
+EXIFTAG_SHARPNESS = 41994
+EXIFTAG_DEVICESETTINGDESCRIPTION = 41995
+EXIFTAG_SUBJECTDISTANCERANGE = 41996
+EXIFTAG_IMAGEUNIQUEID = 42016
+EXIFTAG_SENSITIVITYTYPE = 34864
+EXIFTAG_STANDARDOUTPUTSENSITIVITY = 34865
+EXIFTAG_RECOMMENDEDEXPOSUREINDEX = 34866
+EXIFTAG_ISOSPEED = 34867
+EXIFTAG_ISOSPEEDLATITUDEYYY = 34868
+EXIFTAG_ISOSPEEDLATITUDEZZZ = 34869
+EXIFTAG_OFFSETTIME = 36880
+EXIFTAG_OFFSETTIMEORIGINAL = 36881
+EXIFTAG_OFFSETTIMEDIGITIZED = 36882
+EXIFTAG_TEMPERATURE = 37888
+EXIFTAG_HUMIDITY = 37889
+EXIFTAG_PRESSURE = 37890
+EXIFTAG_WATERDEPTH = 37891
+EXIFTAG_ACCELERATION = 37892
+EXIFTAG_CAMERAELEVATIONANGLE = 37893
+EXIFTAG_CAMERAOWNERNAME = 42032
+EXIFTAG_BODYSERIALNUMBER = 42033
+EXIFTAG_LENSSPECIFICATION = 42034
+EXIFTAG_LENSMAKE = 42035
+EXIFTAG_LENSMODEL = 42036
+EXIFTAG_LENSSERIALNUMBER = 42037
+EXIFTAG_GAMMA = 42240
+EXIFTAG_COMPOSITEIMAGE = 42080
+EXIFTAG_SOURCEIMAGENUMBEROFCOMPOSITEIMAGE = 42081
+EXIFTAG_SOURCEEXPOSURETIMESOFCOMPOSITEIMAGE = 42082
+GPSTAG_VERSIONID = 0
+GPSTAG_LATITUDEREF = 1
+GPSTAG_LATITUDE = 2
+GPSTAG_LONGITUDEREF = 3
+GPSTAG_LONGITUDE = 4
+GPSTAG_ALTITUDEREF = 5
+GPSTAG_ALTITUDE = 6
+GPSTAG_TIMESTAMP = 7
+GPSTAG_SATELLITES = 8
+GPSTAG_STATUS = 9
+GPSTAG_MEASUREMODE = 10
+GPSTAG_DOP = 11
+GPSTAG_SPEEDREF = 12
+GPSTAG_SPEED = 13
+GPSTAG_TRACKREF = 14
+GPSTAG_TRACK = 15
+GPSTAG_IMGDIRECTIONREF = 16
+GPSTAG_IMGDIRECTION = 17
+GPSTAG_MAPDATUM = 18
+GPSTAG_DESTLATITUDEREF = 19
+GPSTAG_DESTLATITUDE = 20
+GPSTAG_DESTLONGITUDEREF = 21
+GPSTAG_DESTLONGITUDE = 22
+GPSTAG_DESTBEARINGREF = 23
+GPSTAG_DESTBEARING = 24
+GPSTAG_DESTDISTANCEREF = 25
+GPSTAG_DESTDISTANCE = 26
+GPSTAG_PROCESSINGMETHOD = 27
+GPSTAG_AREAINFORMATION = 28
+GPSTAG_DATESTAMP = 29
+GPSTAG_DIFFERENTIAL = 30
+GPSTAG_GPSHPOSITIONINGERROR = 31


=====================================
libtiff/tiff_image.py
=====================================
@@ -315,7 +315,7 @@ class TIFFimage:
             # entries must be sorted by tag number
             entries.sort(key=lambda x: x.tag)
 
-            strip_info = strip_offsets, strip_byte_counts, strips_per_image,\
+            strip_info = strip_offsets, strip_byte_counts, strips_per_image, \
                 rows_per_strip, bytes_per_row
             image_directories.append((entries, strip_info, image))
 
@@ -359,7 +359,7 @@ class TIFFimage:
         start_time = time.time()
         compressed_data_size = 0
         for i, (entries, strip_info, image) in enumerate(image_directories):
-            strip_offsets, strip_byte_counts, strips_per_image,\
+            strip_offsets, strip_byte_counts, strips_per_image, \
                 rows_per_strip, bytes_per_row = strip_info
 
             # write the nof IFD entries


=====================================
pyproject.toml
=====================================
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2", 'setuptools_scm_git_archive', 'oldest-supported-numpy']
+requires = ["setuptools>=60", "wheel", "setuptools_scm[toml]>=8.0", 'oldest-supported-numpy']
 build-backend = "setuptools.build_meta"
 
 [tool.setuptools_scm]



View it on GitLab: https://salsa.debian.org/debian-gis-team/pylibtiff/-/commit/7209f482ec216261da1b85cec240a196a122cd5f

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/pylibtiff/-/commit/7209f482ec216261da1b85cec240a196a122cd5f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20230923/845bcf0e/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list