Image Crop
Created by Orckestra
See also:
How to crop images
- In the Media perspective, select an image file.
- Click Crop on the toolbar. The Crop Image window will show the image and cropping options.
To crop an image without keeping an aspect ratio:
- Select "Freehand" (default) for the Aspect Ratio.
- Drag the handles on the cropping selection to change the sizes.
- Click OK.
To crop an image with a predefined aspect ratio:
- Select an aspect ratio other than ""Freehand", for example, "Landscape (16:9)", "Portrait (9:16)" or any other available.
- Drag one of the handles on the cropping selection to change the sizes proportionally.
- Click OK.
Important notes
- When choosing an aspect ratio, the selection gets maximized.
- If the aspect ratio is, for example, 640:480, selecting an area smaller than 640x480 in pixels is impossible. If the original image is smaller than a specific proportion, all the aspect ratio options that do not meet the proportion will be disabled.
- The actual aspect ratio is always reduced to the minimum integer numbers proportionally. For example, if the aspect ratio is 600:900, it actually is 2:3.
- Cropped images are saved in PNG format regardless their original format except for JPEGs, which are saved as JPEGs.
Overwriting an existing file
By default, you save the cropped image as a new file which gets the same name with the aspect ratio name added. If you want to overwrite the existing file instead:
- Select the "Overwriting existing file" option before clicking OK.
Adding custom aspect ratios
By default, the cropping options are:
- "Landscape (16:9)"
- "Portrait (9:16)"
You can add your own aspect ratios:
- Edit
~/App_Data/Composite/Configuration/Composite.Media.ImageCrop.xml
. - Under <
AspectRatio>
, add anadd
element and set its attributes:- name: the name of the aspect ratio that will appear in the Crop Image window, for example, "200 x 200"
- width: the minimum width to proportionally crop an image to
- height: the minimum height to proportionally crop an image with to
- Restart the server (Tools | Restart Server).
Note: The actual aspect ration will be 1:1 and will be maximized to either the height or width of the original image (please see "Important notes" above). For example, if your image is 1200 by 600, then the cropping area with the aspect ratio of 200x200 will be selected as 600 by 600.
Sample:
<configuration> <AspectRatio> <add name="${Composite.Media.ImageCrop,AspectRatio.Landscape}" width="16" height="9" /> <add name="${Composite.Media.ImageCrop,AspectRatio.Portrait}" width="9" height="16" /> <add name="100x100" width="100" height="100" /> <add name="200x100" width="200" height="100" /> <add name="100x200" width="100" height="200" /> <add name="640x480" width="640" height="480" /> <add name="1600x1200" width="1600" height="1200" /> <add name="320x200" width="320" height="200" /> </AspectRatio> </configuration>
Controlling JPEG quality
When you crop JPEG images, the default JPEG quality is 80%. You can change this value at will.
- Edit
~/App_Data/Composite/Configuration/Composite.Media.ImageCrop.xml
. - In the element
configuration/Settings/add[@name='JpegQuality']
set its value attribute to the value between 1 and 100, for example, 60. - Restart the server (Tools | Restart Server).
<configuration> <AspectRatio> <!-- skipped --> </AspectRatio> <Settings> <add name="JpegQuality" value="60" /> </Settings> </configuration>