The decoding File › Open, Place and the renderer share moves to
vectorcraft-doc (decode.rs: decode_image, decoded_layout), and SVG
import's images read through it: the size from the header against the
allowance first, then the pixels as stored with the profile the file
embeds (a TIFF's still read by the TIFF reader).
decoded_pixels_are_those_the_image_crate_read compares PNG, GIF, WebP,
TIFF and BMP at each depth the image crate writes with its pixels, and
JPEG within two steps.
The raster path tells formats with craft-image-codecs' detect, reads the
size from the header (vectorcraft-doc's header_size, the renderer's
decoded_layout, a Targa's own header) and decodes with the renderer's
decode_image, the pixels as stored, with the profile the file embeds.
The size notes Open, Place and the Links panel give, and Glass's Load
Texture, read the same way.
opened_rasters_are_the_pixels_the_image_crate_read compares BMP, TGA and
TIFF at 8 and 16 bits, gray and color, with and without alpha, with the
image crate's pixels, and PNG, JPEG, GIF and WebP stored as they are.
craft-libs main with the JPEG inks reader vectorcraft-doc's CMYK JPEGs use
(#1779) and the craft-jpeg fallback for frames zune-jpeg panics on
(#1782). Cargo.lock regenerated.
The renderer's image paint reads sizes from the header (vectorcraft-doc's
header_size, craft-image-codecs' inspect_raster) and decodes through
craft-image-codecs, the pixels as stored, for the formats it drew
before (PNG, JPEG, GIF, WebP, TIFF and BMP). A test compares the pixels
with the image crate's for each PNG color type and depth, palettes and
1-bit gray, GIF, WebP, TIFF, BMP and JPEG.
The JPEG writer goes back to main's jpeg-encoder one: the craft-image-codecs
version wrote a CMYK JPEG's resolution in a little-endian EXIF of another
layout, failing the tests of main's #3084 fix. TIFF LZW strips stay on
craft-stream-codecs, checked against weezl (now a dev-dependency): read
back the same and never larger.
Remove Background and Color Mask check the image's size from its header
again before decoding ("an image of W × H pixels is too large to change"),
and Crop Image's trim and Remove Background read a file that can't hold
the pixels its header declares as unreadable, as on main. The test helper
reading Remove Background's output keeps 16-bit samples.
The HEIF and JPEG XL readers and their tests go back to main's (heic-rs and
jxl-oxide): the craft-heif and craft-jxl versions failed eight of their
tests (resolution axes after a quarter turn, the container's mirror and
crop, refusing a grid of cropped tiles, 16-bit samples, the decode
allowance). Moving them stays to do.
With Smart Guides and Snap to Tangent on, an Alt+Shift drag with the
Ellipse tool snaps the circle's radius so that the circle touches a
nearby path, when the radius comes within the snapping tolerance of that
size. The touch point is where the line from the center meets a straight
segment or a curve square, inside a segment or at an anchor where the
path runs smoothly, including an anchor where a curve's handle lies on
the anchor. A circle can touch another circle from outside or from
inside. Corners, open path ends and curves around the same center are
not offered.
The touch point shows the "tangent" label, the radius is measured along
the Constrain Angle's axes, and Space moves the circle at the size it
snapped to, which it keeps when Space is let go. When an anchor, center or crossing is near the pointer, or
the dragged corner snapped onto one, the circle is not resized. An
ellipse without Shift is not snapped. Snap to Grid and pixel snapping
place the point instead, also when turned on during the drag, and
turning Snap to Tangent off during the drag stops the snap. A press
with a small jitter is still a click rather than a drag. Each pointer move
measures at most 256 segments near that radius.