Macros/Impress/003/en

Description
This macro allows you to automate the cropping of images in a customizable manner. To that end, among other things it makes use of ''' com.sun.star. text.GraphicCrop'''. Note that simply changing the  of an image does not execute smoothly, which is why the below macro adjusts the position and size of the image so that it is static and not compressed or stretched after execution of the macro. The macro is also designed to take into account previously applied cropping values to the image, so you can execute the macro multiple times on the same image.

Note that one main missing feature of this macro is that the image must be in its original size to avoid compression/stretching of the image, upon execution of the macro. (If you find a solution that allows changing the size, feel free to edit this wiki page.) Be wary also that if you paste an image that is larger in pixel dimension than the slide itself, it will be automatically compressed, which would cause stretching of the image when you execute the macro.

Python
tbc

Download ODP file

 * [[Media:Example macro for custom cropping of images.odp|Download ODP file with this macro included.]]