Replies: 1 comment
-
Actually, it looks like its just the windows image viewer being shit. They look the same on Mac. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've spent too many hours trying to get a heic to jpg conversion script working, and pillow-heif has so far been the only package that seems to actually work on Windows. However, the resultant files don't look the same as the original heics - it's like the gamma is lower. Possibly a HDR to SDR conversion issue. The original files are from an iPhone.
I get the same results with the following:
def convert_heic_to_jpeg_old(file_path, QUALITY=90):
register_heif_opener()
with Image.open(file_path) as img:
jpeg_path = os.path.splitext(file_path)[0] + '.jpg'
#img = ImageOps.exif_transpose(img)
icc_profile = img.info.get('icc_profile')
img.save(jpeg_path, 'JPEG', quality=QUALITY, icc_profile=icc_profile)
and
def convert_heic_to_jpeg(file_path):
jpeg_path = os.path.splitext(file_path)[0] + '.jpg'
heif_file = pillow_heif.open_heif(file_path, convert_hdr_to_8bit=False, bgr_mode=True)
np_array = np.asarray(heif_file)
cv2.imwrite(jpeg_path, np_array).
Can someone please halp?
Here's a screenshot of an example image pair (it won't upload heic files). Source files have a bit depth of 32.

Beta Was this translation helpful? Give feedback.
All reactions