I know that with \includegraphics
there is the option to trim images, but this is only practical for images I know the size of, so I can trim them the way it fits perfectly for the given image.
Assuming I want to add a random image to my document (I am using XeLaTex). I want to resize it to exact measurements - say 250x300px - without knowing the actual size of the image (but assuming it is at least as big as these measurements).
Is there a package for an automatical cropping of images like described above?
EDIT: For further visualization, I will add a little sketch of what I aim to achieve.
Assume I have a document in which I want to place an image with specific height AND width (my placeholder). Now I want to add the image with the palm trees that obviously has a size not fitting to the placeholder.
What I want is the image to be cropped somewhere (not necessarily beautifully) to fit the given size:
In reality, the given images will be actually of a similar size as the placeholder, so a "random" cropping wouldn't be that ugly. But it is necessary for my design's sake that every picture fulfils the given height and width properties exactly.
graphicx
package provides quite a few methods for resizing. – barbara beeton Jun 2 '20 at 22:53\includegraphics[width=...,height=..]{graphics}
. Is that correct? If so, why, i.e. what is wrong with this option? – user194703 Jun 2 '20 at 23:00