Skip to content

Commit

Permalink
Fix converting RGBA images
Browse files Browse the repository at this point in the history
  • Loading branch information
Brich40 committed Jan 17, 2024
1 parent ec153e6 commit 6015751
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/classes/Files.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@

def convert_heif_to_jpg(file):
heif_file = pyheif.read(file)
return Image.frombytes(
heif_file = Image.frombytes(
heif_file.mode,
heif_file.size,
heif_file.data,
"raw",
heif_file.mode,
heif_file.stride,
)
heif_file = heif_file.convert('RGB')
return heif_file


class Files:
Expand Down

0 comments on commit 6015751

Please sign in to comment.