OneMore icon indicating copy to clipboard operation
OneMore copied to clipboard

Auto-resizing for images

Open gexgd0419 opened this issue 2 years ago • 1 comments

#490 mentioned that OneNote will auto-resize containers as long as they haven't been resized manually.

The same goes for images. Images can also be auto-resized to fit their containers, but once you resize them manually, their sizes are fixed.

There's a one:Size element inside the one:Image element. If the image has been manually resized, it will have the attribute isSetByUser="true".

If the one:Size element of an image does not have the isSetByUser="true" attribute, the width and height attributes are the maximum size of the image, not the displayed size. They will not change when auto-resizing happens.

You can change the "maximum size" without setting isSetByUser="true" with the XML editor. However, once isSetByUser="true" is set, you can no longer unset it.

The only way I found to reset the attribute is, open the XML editor, set PageInfo to All, remove the objectID attribute of the parent one:OE element, then change the one:Size to remove isSetByUser="true". I guess that this may actually be recreating the image.

The way the image is inserted also affects whether it will be auto-resizable.

  • If the image is inserted from an image file, it will be without isSetByUser="true" (auto-resizable), and its "maximum size" is usually below 500x500. (I have no idea how the initial maximum size is calculated) But even if the maximum size is too large, the image can be auto-resized to fit its container.
  • If the image is pasted from clipboard, however, it will be in its original size, with isSetByUser="true" (not auto-resizable). If the pasted image is large, it can expand its container and extend outside of the screen, thanks to its size being fixed. #934 mentioned this problem as well.

If this could be implemented as a feature, it can be a checkbox labeled "Enable auto-resizing" in the Resize and Adjust Image dialog.

gexgd0419 avatar Oct 03 '23 09:10 gexgd0419

If this could be implemented as a feature, it can be a checkbox labeled "Enable auto-resizing" in the Resize and Adjust Image dialog

This somehow refs https://github.com/stevencohn/OneMore/issues/857, which asks for persistence of the resize settings. For me, a default resize to 50% (or maybe 75%) would be enough to fix the issue.

Maybe, you could explain the usage of auto-resize? Is it when using OneNote on a mobile device and desktop?

koppor avatar Dec 16 '23 07:12 koppor

This was released in December 2023. Closing this ticket.

stevencohn avatar Jul 11 '24 13:07 stevencohn