diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9786107c..8b83625a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . +Changes in v2023.10.0: + 1/ Fix segfaults with some TIF files and some Qt versions. (#211) + 2/ Fix missing _version file when using run_photini.py. (#210) + 3/ Fix Pillow filter name error. + 4/ Other minor improvements and bug fixes. + Changes in v2023.7.1: 1/ Fix bug setting file dates before 1970 on Windows. diff --git a/src/photini/types.py b/src/photini/types.py index 17f2615a..eeab0c76 100644 --- a/src/photini/types.py +++ b/src/photini/types.py @@ -545,6 +545,7 @@ def image_from_data(data): image = reader.read() if image.isNull(): raise RuntimeError(reader.errorString()) + image.buf = buf return fmt, image @staticmethod diff --git a/src/run_photini.py b/src/run_photini.py index 0eb3ee9b..4f1db884 100644 --- a/src/run_photini.py +++ b/src/run_photini.py @@ -1,6 +1,6 @@ ## Photini - a simple photo metadata editor. ## http://github.com/jim-easterbrook/Photini -## Copyright (C) 2019 Jim Easterbrook jim@jim-easterbrook.me.uk +## Copyright (C) 2019-23 Jim Easterbrook jim@jim-easterbrook.me.uk ## ## This program is free software: you can redistribute it and/or ## modify it under the terms of the GNU General Public License as @@ -22,8 +22,24 @@ """ +import os import sys +src_dir = os.path.dirname(__file__) +version_file = os.path.join(src_dir, 'photini', '_version.py') +if not os.path.exists(version_file): + try: + from setuptools_scm import _get_version + from setuptools_scm.config import Configuration + _get_version(Configuration.from_file( + os.path.join(os.path.dirname(src_dir), 'pyproject.toml'))) + except ImportError: + with open(version_file, 'w') as f: + f.write('''# file generated by run_photini.py +# don't track in version control +version = '0.0.0+unknown' +''') + from photini.editor import main if __name__ == "__main__":