Native file: a distorted image with a malformed saved corner opens placed by its transform

A native file whose `image_quad` held an entry that was not a point among
its first four failed to open: `image_corners` read each entry as a
`Point` and returned the error. Such corners, and an `image_quad` that is
not a list, are now dropped as the file is read, and the image opens
placed by its transform, as a list of other than four points already did.
A point is `[x, y]` or `{"x": x, "y": y}`; values that are not taken are
skipped without being kept in memory.

Follows #8392.
This commit is contained in:
dotCooCoo
2026-11-20 22:40:02 -08:00
parent 063f550802
commit 525dea58f0
3 changed files with 218 additions and 25 deletions
+2 -2
View File
@@ -7565,8 +7565,8 @@ allowed. In EMF each piece stores only the pixels inside its clip, with a pixel
clip, so they write the image as the parallelogram nearest its corners and warn. Corners that would fold the image over
itself, put three corners on one line, join two corners, cross the warp's horizon or lie too close together for a
perspective map are an error, and nothing changes. A transform that squeezes the corners past what a perspective map
can place leaves the image at the parallelogram nearest them. A file whose `image_quad` holds other than four points,
or breaks these rules, opens with the image placed by its transform. A drag is one undo step, and a distort that leaves
can place leaves the image at the parallelogram nearest them. A file whose `image_quad` is not a list, holds other than four points
(an entry that is not a point included), or breaks these rules, opens with the image placed by its transform. A drag is one undo step, and a distort that leaves
the corners where they are records none. Image info (`image.info`) gives a distorted image's resolution at its middle, and Link
Info (`links.info`) gives its scale and rotation there.