[UNRESOLVED BUG] Intersecting shape and image resizes original image

If you stumbled across this thread to figure out the fix, it’s an active bug in LO that hasn’t yet been resolved. The associated bug report on Bugzilla can be found here. I’ll edit this thread as resolved as soon as a patch is made!

When I try to crop out a shape from an image by using the “intersect” tool, the original image is first reshaped, which I don’t want to have happen; I expect the intersection tool to “cut out” the piece of the image currently visible.

Here’s what the shapes look like just before I make the intersection:

And here’s what it looks like after intersection.

As you can see, the image is resized to fit the shape first, instead of being cut out. I assume this is a bug, but if it isn’t, how can I get the desired behavior?

System Info

LibreOffice Ver: 25.2.0.3 Flatpak
OS: Kubuntu 22.0.4

  1. You can right-click the image and select Crop.

  2. Crop to the edge of the shape and then click away to exit from cropping.
    CropBeforeIntersect

  3. Then select both and do Shape > Intersect

This is less a solution, and more a workaround (which I do appreciate nonetheless). It still scales the new cropped version if I didn’t line up the edges perfectly, whereas the intersect tool shouldn’t be erroneously resizing the underlying image, as that’s not a part of having two shapes intersect.

It also seems like this has been a problem for more than a decade.

How to Report Bugs in LibreOffice - The Document Foundation Wiki

I made sure to add a new comment to the existing bug!

New steps for exact crop

  1. Size the shape to your desired dimensions with and place it over the image in your desired position. Open the Position and Size dialogue and enter the width, height and x & y positions in the spreadsheet CalculateIntersectCropOfImage.ods

  2. Click the image and open the Position and Size dialogue box and enter the width, height and x & y positions in the spreadsheet CalculateIntersectCropOfImage.ods

  3. With the image selected, click Format > Image > Crop dialogue box and enter the crop amounts and OK

  4. Select both objects and click Shape > Align Objects > Centered and then Shape > Align objects > Middle.

  5. With both objects selected click *Shape > Intersect.

CalculateIntersectCropOfImage.ods (13.2 KB)
SampleExactCrop.odg used for screenshot and in spreadsheet
SampleExactCrop.odg (566.3 KB)

It’s good that there’s another method of accomplishing this task, but needing to use an entirely separate spreadsheet document just to crop an image to a shape feels to me like a glaring concession that the tooling for this behavior is simply not adequate. This kind of excessive workaround is precisely the thing that would deter a new user.

For now, I’ll edit my original post to use the original “crop the image first” method, so I’ll mark your previous response as a solution, but I do hope that bug continues to receive traction so that it’s eventually patched!

For people browsing this thread; if you have snapping turned on (that’s what makes things like alignments and resizings “click” into certain convenient places), then you should be able to snap the edges of your image crop to the edges of the shape in order to make a perfectly resized image. A little more work than just the intersect, but not too terrible overall!

When I was doing a lot of work in Photoshop I used a spreadsheet for resolution calculations so I don’t find it unusual. Easier than doing them in your head

Ah, I might’ve misexpressed myself; what I mean to say is that I view something like cropping an image to fit a shape to be a functionality that shouldn’t require an external tool at all, seeing as alternatives like Google Slides and Powerpoint support this with the “intersect” tool working as expected!