Remove heic2jpeg and add libheif-examples instead
This commit is contained in:
parent
1d8defc5bb
commit
2c3425c94d
3 changed files with 10 additions and 11 deletions
|
@ -9,13 +9,9 @@ Installation
|
|||
------------
|
||||
|
||||
```
|
||||
sudo apt-get install ufraw-batch imagemagick
|
||||
git submodule update --init --recursive
|
||||
sudo apt-get install ufraw-batch imagemagick libheif-examples
|
||||
pipenv install
|
||||
pipenv shell
|
||||
cd heic2jpeg
|
||||
pipenv install
|
||||
cd ..
|
||||
```
|
||||
|
||||
License
|
||||
|
|
4
edit.py
4
edit.py
|
@ -7,7 +7,6 @@ import exif
|
|||
from geopy.geocoders import Nominatim
|
||||
from datetime import datetime
|
||||
import pathlib
|
||||
from heic2jpeg import heic2jpeg
|
||||
|
||||
def wait_with_check_closing(win_name):
|
||||
"""
|
||||
|
@ -35,9 +34,6 @@ class Image:
|
|||
print("editing", path)
|
||||
self.w = w
|
||||
self.h = h
|
||||
if pathlib.Path(path).suffix.lower() == ".heic":
|
||||
h2j = heic2jpeg.Heic2Jpeg(path)
|
||||
path = h2j.safe()
|
||||
self.path = path
|
||||
self.image = cv2.imread(self.path)
|
||||
self.geolocator = Nominatim(user_agent="jeena-synology-pictures")
|
||||
|
|
11
synology.py
11
synology.py
|
@ -53,9 +53,16 @@ def fetch_files(remotehost, pictures):
|
|||
escaped_remotefile = helper.escape_file_path(remotefile)
|
||||
cmd = 'scp -P 23 "' + remotehost + ':' + escaped_remotefile + '" "' + localfile + '"'
|
||||
if os.system(cmd) == 0:
|
||||
(p, e) = os.path.splitext(localfile)
|
||||
if e == ".HEIC":
|
||||
old_localfile = localfile
|
||||
localfile = old_localfile + ".jpg"
|
||||
cmd = 'heif-convert "' + old_localfile + '" "' + localfile + '"'
|
||||
os.system(cmd)
|
||||
os.remove(old_localfile)
|
||||
# Get .xmp file if available
|
||||
cmd = 'scp -P 23 "' + remotehost + ':' + escaped_remotefile + '.xmp" "' + localfile + '.xmp"'
|
||||
if os.system(cmd) == 0:
|
||||
cmd = 'scp -P 23 "' + remotehost + ':' + escaped_remotefile + '.xmp" "' + localfile + '.xmp"'
|
||||
if os.system(cmd) == 0:
|
||||
# Use darktable
|
||||
d = Darktable(localfile)
|
||||
d.export()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue