

This would increases the gap between the resolution of the inserted image and the user defined max dpi.

Moreover, if you take into account a 1 cm margin, the area to be fit is 2362x3390 pixels at 300 dpi. The difference between those form factors and the maximum number of pixel allowed by the page (user defined maximum resolution) would help to guess the new resolution of the inserted image.

Note that the A4 form factor doesn't fit a 4/3 form factor of the image. This would keep enough margin in order to later crop or resize the image before exporting with the "minimizer" tool.įor example, if you have a 10 Megapixel image (4/3 form factor, 3640 pixels for the big side), it will exceed 300 dpi if you make this image fill a A4 page (21x29,7 cm or 8,3x11,7 inches or 2480x3507 pixels at 300 dpi). Picture tmpPic = picture.resize(picture.currentSize).crop().withJPEGCompressionRatio(0.7) Īt insertion time (or at saving time as you proposed), you can reasonably assume that the image would possibly not exceed the page dimension. If (picture.currentSize < picture.initialSize) Since you already have all the code required to resize the pictures and save them, and since the whole point of a WYSIWYG editor is to perform action in live, I'm asking if it's possible to add a menu action (not automatic, but manual), where Writer would do: Third, what I'm asking here is for simplifying the process to the end-user.Įven for a power user who knows about pictures / resolution, having to fire up Gimp / Photoshop, figure out the part to crop, resize, save to a temporary folder, drag the worked picture to the document, and then realizing it's still too large / small, is very long, painful, if not disappointing. Usually, people try to send a document as an email attachement, and a 30MB file is a no-no. Second, your main competitor has this options for ages (appeared in Word 95), so you can't tell user to switch to your software if this feature is missing. And I'm not asking about creating a picture editor in LO. Well I'm sorry, but I think you're not leading in the right direction.įirst, most people using Writer usually don't have the skills to open Gimp / Photoshop and resize the picture, nor the knowledge about how pictures work.
