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.
group3_tiff_rgba decodes each strip or tile with
craft_stream_codecs::decode_ccitt_raw instead of hayro-ccitt; the error
messages stay as they were. vectorcraft-engine's group3_reference test
keeps the hayro-ccitt reader as the reference: over 190 Group 3 TIFFs and
5,500 cut or edited copies the pixels and refusals match, except that a
strip or tile wider than MAX_CCITT_COLUMNS (2^20) is refused as an
overflow where hayro-ccitt ran out of data. Needs craft-libs#1772.
The CMYK reader's JPEG side (inks, component count, size, ICC profile)
uses craft_image_codecs::jpeg_inks instead of zune-jpeg, which stays only
as the dev-dependency the comparison test reads with: inks, sizes,
component counts and profiles match it over CMYK, YCCK, RGB and gray
JPEGs, whole and cut off. Frames zune-jpeg panicked on read as no inks.
Needs craft-libs#1779.
EPS fax images decode with craft_stream_codecs::decode_ccitt_raw instead
of hayro-ccitt directly. With EndOfBlock the rows end at the end-of-block
code whatever Rows says (rows 0), as before. Needs craft-libs#1772
(rows on bytes exactly as EncodedByteAlign says).
New Document opened on the most recent entry in the units that entry was
made in, so with Preferences › Units › General in millimeters, File › New
and New Without Dialog still made documents in points, and the rulers and
the Measure tool, which follow the document's units, read points. The
dialog now opens in the General units on a Recent entry too. An entry
made in pixels, and an entry that is a saved preset in the units it was
saved in, keep their units. Before, the dialog opened in the entry's
own units.
Units chosen in the Units menu were also replaced by the next tab, card
or preset chosen, for example the Web tab's pixels, or a Recent or Saved
card's units on a click or on the double-click that creates the
document. A choice made in the menu, or with ui.dialog.set (also while
More Settings or Manage Profiles is open), now stays until Create.
Without such a choice, clicking another Recent or Saved card still
brings back that card's own units.
Docs: docs/mcp.md (New Document), docs/target-app-parity.md evidence.
header_size reads every format's header through craft-image-codecs
(probe_allocation_size: stored size with no limit; a GIF's logical
screen through probe_size), no longer through the image crate's
readers. Metafile DIBs are written as PNG by craft-image-codecs.