Skip to content

Commit

Permalink
Decode: More accurate error description #86
Browse files Browse the repository at this point in the history
  • Loading branch information
bigcat88 committed Mar 23, 2023
1 parent 2f7aeaf commit 8393471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pillow_heif/_pillow_heif.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ int decode_image(CtxImageObject* self) {
heif_image_release(self->heif_image);
self->heif_image = NULL;
PyErr_Format(PyExc_ValueError,
"corrupted image(dimensions in header: (%d, %d), decoded dimensions: (%d, %d)",
"corrupted image(dimensions in header: (%d, %d), decoded dimensions: (%d, %d)). "
"Set ALLOW_INCORRECT_HEADERS to True if you need to load it.",
self->width, self->height, decoded_width, decoded_height);
return 0;
}
Expand Down

0 comments on commit 8393471

Please sign in to comment.