mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-06 18:51:26 +00:00
metafile_size() parsed the whole metafile, decoding every bitmap and building every path, to read two numbers at picture insert and replace. A new wordcraft_metafile::size reads the frame from the EMF header or the placeable WMF header, and falls back to the full parse for every other file (plain WMF, an EMF without a usable frame, a file with no records), so it returns what parse would. For an EMF with one 8000x5000 1 bpp bitmap the size now costs well under a microsecond instead of about 280 ms. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>