Я пытаюсь преобразовать файл heic в jpeg, импортируя также все метаданные (например, информацию о GPS и другие вещи), к сожалению, с приведенным ниже кодом преобразование в порядке, но метаданные не сохраняются в созданном файле jpeg. Кто-нибудь может описать мне, что мне нужно добавить в метод преобразования?
heif_file = pyheif.read("/transito/126APPLE_IMG_6272.HEIC")
image = Image.frombytes(
heif_file.mode,
heif_file.size,
heif_file.data,
"raw",
heif_file.mode,
heif_file.stride,
)
image.save("/transito/126APPLE_IMG_6272.JPEG", "JPEG")