The following article shows a way to crop and resize an image to a desired size using DynamicCrop tool. The general idea is thathaving an image in its original size and wishing croping and resizing it for web publication in a defined size, it will be utilized the process DynamicCrop to generate a new image in one simple step.
The original size in pixel of the image can be read in the tool bar information of the aplication, normally in the botton of the screen.
w correspond to width and h to height (followed are the channel numbers, deep in bits, color space and size of the file).
First step is open DynamicCrop tool and generate over the image a rectangle covering the area you wish to obtain as final image, dragging and dropping the mouse to achieve it. The size in pixels of width and height in the crop can be seen into Size/Position, as well as the coordinates (Anchor X y Anchor Y) of the anchor point of reference, which can be modified in some of the 9 options by clicking over the 3x3 box, where the X shows the used, being the predetermined the central (where the coordinates correspond to the center of the crop area)
Note that once this was done, the pointer changes depending on where is positioned. In the corners and laterals can be modified in width and height (indicated this by a box pointer with little indicators of the available direction of modification depending on which lateral or corner the cursor is positioned), and out of the crop area a circular pointer will indicates the possibility of rotate the crop. If the crop area is outside the image area, this shortage will be filled with the color indicated into the option Fill Color of DynamicCrop, being by default black.
Different options of pointer in DynamicCrop:
The cursor in the corners of the crop allows to modify height and width simultaneously, from the corner where is positioned. In the example: bottom right. The actual exact size of the crop can be read into Size/Position in DynamicCrop.
Outside the crop area, but inside the image window, a circular pointer indicates the possibility of rotate the crop. The exact angle in which the crop has been rotated can be read into Rotation of DynamicCrop.
Inside the crop area a square pointer indicate the option to move the crop, without modifying it size, simply repositioning the crop area inside the image window.
By default in the central area of the crop is located the rotation axis, which can be moved. When is moved changes the rotational axis that uses the crop.
Once determined the area of the crop and assuming that the final image will have a size of 1200 x 800 px (for instance; because you use a predefined size in a gallery), must be introduced this sizes in Scale option in DynamicCrop, in the fields Width and Height, the desired width (1200 for this example) and the desired height (800 for this example).
Now have to be considered with attention the values of Scale X and Scale Y, which have changed from 1.0000 to a lower value (because the image is being reduced). As we wish that the scale in X (horizontal) is equal to the scale in Y (vertical) since otherwise the image will be distorted (lost it aspect ratio), one of the values must be copied (either X or Y), so that both are equal. Assuming that the width of the cropping area is the priority, must be copied the Scale X value to Scale Y.
Once copied the scale X to Y the value of Height (in this case) will be modified. As last step before the crop, must be adjusted manually the value of the rectangle previously created until the value of Height is the desired originally, in this case 800 pixels. For that, set the cursor in the upper or bottom part of the crop and resize it until the value reach the desired, in this example 800.
That way, having the same scale in both directions and desired width and height, can be applied the process over the image. The resulting image will be cropped by the selected area and will have the new size set in scale.
In the case that only a crop to a fix size is desired without changing the scale of the image, simply must be introduced the values of desired crop size in the options Size/Position and move/rotate the area to convenience, but without changing its size manually (otherwise will change the size of the final crop, and in this example we look for a crop with a specific size). For example, in case of wanting a crop of 600x600 pixels, must enter these values as Width and Height.
That way the image will not change its scale, only will be cropped. In the example above also was slightly rotated, note the exact value of the angle in the field Angle (°) in Rotation options. This value also can be entered numerically or moving the the ratio of the circle drawn to the right of the data. Maintain 0 for no rotation.
The final result is a crop without scale changes and with the entered size, including rotation.
DynamicCrop is a tool with official documentation available (learn how to see documentation).