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.
b3b8521ab isn't on craft-libs main. Its probe_stored_size was only needed for
DXF image sizes, which vectorcraft_doc::header_size already reads from PNG,
JPEG, BMP and TIFF headers.
* cad: export DXF through craft-dxf's drawing writer
Delete the local ASCII writer and map the document through
craft_dxf::drawing. Public vectorcraft_cad::export, DxfOptions and
DxfVersion stay so vectorcraft#3068 can rebase without a writer API
change. Pin craft-dxf at the craft-libs#1588 branch tip; update the
rev after that PR merges. Golden files lock shapes_doc() bytes for
R12 and 2018 against the old writer. Part of storytold/craft-libs#791
and #778.
* cad: pin craft-dxf to the #1588 tip with Dylan's writer fixes
Point craft-dxf (and craft-codepage from the same rev) at
0b6244f2b9971deaeb6a79d932c818ff94479757, which includes the
Windows golden line-ending fix, BYBLOCK and image-dictionary
key changes, and the compile fix for the dictionary-key test.
Update the pin again to the merge commit after #1588 lands.
* cad: pin shared DXF writer to merged craft-libs #1588
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
- EPS CCITTFaxDecode goes back to hayro-ccitt (main's filters.rs and data.rs):
craft-stream-codecs decodes /K -1 /Columns 70 data to other rows
(eps import::tests_images::ccitt_fax_images_draw). DCTDecode is main's again.
- The AI editing writer decodes through the image crate again: going through
RGBA8 lost 16-bit sources, so their 8-bit warning disappeared
(ai_editing::tests::sixteen_bit_images_are_written_at_eight_bits).
- Crop Image refuses an image over its allowance by header size again, with
main's "an image of W × H pixels is too large to draw" message.
- Test fixes: colorized_images writes its gray PNGs gray again, and the PDF
16→8-bit test expects rounding, as the 8-bit copy is made.
Reuse the panel deletion helper so the clicked swatch is deleted only after confirmation. Cover confirmation text, cancellation, clicked-item targeting and Undo across all five views. All 39 Swatches tests and all 13 local CI gates pass; fresh deep CodeRabbit review reports zero findings.
craft_image_codecs::probe_size only reads WebP, EXR and the GIF/BMP/TGA family;
for PNG, JPEG and TIFF it returns Unsupported. The cutover used it for header
sizes, so DXF export left every PNG out (cad tests), plugin objects lost PNG
pixels, and EPS image-mask and SVG import fell back to decoding whole images to
learn their size. vectorcraft_doc::header_size reads PNG's IHDR and a JPEG's
frame through craft-image-codecs and other formats through the image crate's
header readers, as main does, without decoding pixels. The SVG filter's JPEG
size comes from jpeg_info instead of a full decode.
- Test files whose image→craft-image-codecs rewrites didn't compile against
main's newer tests go back to main's versions (engine fileio/tests.rs,
tests_tiffbmp.rs, tests/menucmds.rs, eps tests.rs); they still use the image
crate, which keeps its format features.
- craft_jxl::encode, craft_image_codecs::encode and Image::icc at d6cd7836d.
- jp2read and pdf export pass DecodeOptions, not Limits.
- EPS DCTDecode: grey JPEGs no longer use the image after moving it, and keep
main's one-channel output.
- svg keeps its direct usvg dependency for main's image href code; pdf keeps
jpeg-encoder for CMYK JPEGs.
- clippy -D warnings and rustfmt clean.
When image resource 1050 declared more bytes than the image resources
hold, the lookup stopped as if the file stored no slices, and Open and
Place brought the artwork in without the warning that the slices were
left out. The new psdread::resource tells a cut-short resource 1050
apart from one that is absent or that follows another block cut short,
and the slices reader passes that error on, so the warning names it.
Other resource readers keep their behavior.
Paste without Formatting sets each pie legend label in a wedge to white or
black from the wedge colors before it pastes, but a wedge linked to a global
swatch that the document gives another color takes the document's color
only during the paste (swatchConflict "merge", the default). A light wedge
merged into a dark swatch kept a black label, and a later redraw turned it
white.
The copied colors linked to merged swatches now take the document's color
before the labels are set, so the labels match what a redraw sets. Graphic
style links are left for the paste to relink.
With the art of a graph design in a series given first and aligned: true,
effect.remove and effect.duplicate with `indices` skipped an effect of the
art that no other object has, and edited the others. With art [shadow,
roughen], a mark [shadow] and indices [0, 1], effect.remove took the
mark's shadow off and succeeded. Such an edit is now an error that leaves
the document and its undo history as they are, as the same index given
alone already was. An object that lacks one of the effects while another
object has it is still left out for that effect.