AspectCrop() Demo Page

Resize and crop an image to a fixed dimension while maintaining aspect

Width:
Height:
Crop Position:

Original Image

AspectCrop()
crop to center

Comparisons

ImageCrop()

ImageResize()

ImageScaleToFit()