Skip to content

Commit

Permalink
Merge pull request #212 from jim-easterbrook/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
jim-easterbrook committed Oct 2, 2023
2 parents bafbcb2 + 4cab66f commit 36e7ea1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.

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.

Expand Down
1 change: 1 addition & 0 deletions src/photini/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion src/run_photini.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Photini - a simple photo metadata editor.
## http://github.com/jim-easterbrook/Photini
## Copyright (C) 2019 Jim Easterbrook [email protected]
## Copyright (C) 2019-23 Jim Easterbrook [email protected]
##
## This program is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
Expand All @@ -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__":
Expand Down

0 comments on commit 36e7ea1

Please sign in to comment.