The links.unembed params text and docs/mcp.md now say that a distorted
image from a PSD or PSB file keeps its clip group when Unembed writes it
in the format it is stored in (PNG, or TIFF for a CMYK file), and that
Relink and Update Links to the written file keep it too. A path that
converts the image writes no clipping path, and the clip group becomes a
plain group.
- Test: tests_psdread::unembed_keeps_the_clipping_path_of_a_distorted_psd
adds an Update Links step on the written file and an Unembed to a .jpg
path.
The loader change that read the clipping path a PNG or TIFF keeps also
changed File > Open and File > Place of plain images. It is now #8561,
with its tests, params text and docs, and this branch reads files as
main does.
For a distorted image, Relink and Update Links now read the new file's
clipping path from the PNG or TIFF it is stored as when the reader gives
none, as they already do for the old file. Unembed of a distorted image
from a PSD or PSB file, with or without a folder, therefore keeps the
clip group of that file's clipping path, and so does a later Relink to
the written file.
- Test: tests_psdread::unembed_keeps_the_clipping_path_of_a_distorted_psd
(RGB file kept as PNG, CMYK file kept as TIFF, path and folder).
- Docs: docs/mcp.md, links.unembed params text, the progress-doc line.
Relink with `preserve` on an image changed by Perspective Distort or
Free Distort keeps the image's corners and now adds a `warnings` entry
naming the images the value was not applied to.
The params text of Update Links now says how it handles a distorted
image's corners and clipping path, and the docs/mcp.md paragraph is
rewrapped. docs/mcp.md says that Open also reads a PNG or TIFF written
by Unembed with its clip group.
New tests cover Update Links and Relink of a distorted image with a
PSD or DCS clipping path, Relink with scope all of a distorted image in
an opacity mask, and Open of a file written by Unembed.
An image changed by Perspective Distort or Free Distort was refused by
Relink, Embed and Unembed. Each now keeps the image's corners in one
undo step:
- Relink puts the new file's pixels between the corners, as Update
Links does, whatever `preserve` or the image's Placement Options say.
- Embed keeps the file's pixels in the document between the corners,
reading the file first when the image shows its saved preview.
- Unembed writes the pixels to the file and links the image to it with
the same corners. Unembed into a folder keeps the corners too.
Relink and Update Links also follow the clipping path a PSD, PSB or DCS
file names for a distorted image: the path is drawn through the corners,
a clip group of the old file's path takes the new file's, and it becomes
a plain group when the new file names none.
Unembed of an image from a PSD or PSB file took away the clip group of
the file's clipping path, plain images included: the PNG or TIFF it
writes keeps the path, but the file was read without it. A PNG or TIFF
that keeps the path now comes with it when it is read, so Unembed, and a
later Place, Relink or Update Links of the written file, keep the clip
group.
The params text of Relink, Embed and Unembed, docs/mcp.md and the
progress-doc line describe the new behavior.