You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing a raw pixel buffer with arboard::set_image does not include DPI/pHYs metadata.
Result: a 591 px grayscale image (generated at 300 DPI for a 5 cm width) is interpreted by Word as 96 DPI and pastes at the wrong physical size (~15.6 cm).
If a PNG containing pHYs/DPI is written to the clipboard, Word respects the metadata and the size is correct.
Steps to reproduce
Create a 591 px wide image intended to be 5 cm at 300 DPI.
Copy it to the clipboard with arboard::set_image(ImageData { ... }).
Paste into Microsoft Word — Word treats it as 96 PPI, so it appears ~15.6 cm.
If you instead write a PNG with pHYs/DPI metadata to the clipboard, Word reads it as 300 PPI and the image is correctly 5 cm.
Expected
Ability to preserve/declare DPI when writing images to the clipboard, or ability to write image/png or image/tiff bytes (with pHYs/DPI) to the clipboard so receivers restore physical size correctly.
Simple suggestion
Add set_bytes_with_format(format: &str, bytes: &[u8]) to allow writing PNG/TIFF with pHYs;
Or add an optional dpi field to set_image so backends write clipboard representations that include DPI.
Description
Steps to reproduce
arboard::set_image(ImageData { ... }).Expected
Simple suggestion
set_bytes_with_format(format: &str, bytes: &[u8])to allow writingPNG/TIFFwith pHYs;