TransformPicture



Transform freely. The Free Transform command lets you apply transformations (rotate, scale, skew, distort, and perspective) in one continuous operation. You can also apply a warp transformation. Instead of choosing different commands, you simply hold down a key on your keyboard to switch between transformation types. Learn Photoshop with PiXimperfect Patreon Family:Quick and Easy Way to Transform Your Photos into a Simple Sketch with Photoshop!. Using machine learning techniques combined with a Generative Adversarial Network (GAN) makes it possible to generate anime-style characters based on real people. Using this website, you can generate your own anime alter ego!

4D v15.6
TRANSFORM PICTURE


TransformPicture
TRANSFORM PICTURE ( picture ; operator {; param1 {; param2 {; param3 {; param4}}}} )
ParameterTypeDescription
picture PictureSource picture to be transformed
Resulting picture after transformation
operator LongintType of transformation to be done
param1 RealTransformation parameter
param2 RealTransformation parameter
param3 RealTransformation parameter
param4 RealTransformation parameter

The TRANSFORM PICTURE command applies a transformation of the operator type to the picture passed in the picture parameter.

Note: This command extends the functionalities offered by conventional picture transformation operators (+/, etc., see the Picture Operators section). These operators remain entirely usable in 4D.

The source picture is modified directly after execution of the command. Note that certain operations are not destructive and can be reversed by performing the opposite operation or by means of the “Reset” operation. For example, a picture reduced to 1% will regain its original size with no alteration if it is enlarged by a factor of 100 subsequently. Transformations do not modify the original picture type: for example, a vectorial picture will remain vectorial after its transformation.

In operator, pass the number of the operation to be carried out and in param, the parameter(s) needed for this operation (the number of parameters depends on the operation). You can use one of the constants of the 'Picture Transformation' theme in operator. These operators and their parameters are described in the following table:

operator (value)param1param2param3param4ValuesCancellable
Reset (0)------
Scale (1)WidthHeight--FactorsYes
Translate (2)X axisY axis--PixelsYes
Flip horizontally (3)----Yes
Flip vertically (4)----Yes
Crop (100)X Orig.Y Orig.WidthHeightPixelsNo
Fade to grey scale (101)- - - -No
Transparency (102)RGB color---HexadecimalNo
  • Reset: All matrix operations carried out on the picture (scale, flip, and so on) are undone.
  • Scale: The picture is resized horizontally and vertically according to the values passed respectively in param1 and param2. These values are factors: for example, to enlarge the width by 50%, pass 1.5 in param1 and to reduce the height by 50%, pass 0.5 in param2.
  • Translate: The picture is moved by param1 pixels horizontally and by param2 pixels vertically. Pass a positive value to move to the right or towards the bottom and a negative value to move to the left or towards the top.
  • Flip horizontally and Flip vertically: The original picture is flipped. Any movement that was carried out beforehand will not be taken into account.
  • Crop: The picture is cropped starting from the point of the param1 and param2 coordinates (expressed in pixels). The width and height of the new picture is determined by the param3 and param4 parameters. This transformation cannot be undone.
  • Fade to grey scale: The picture is switched to gray scale (no parameter is required). This transformation cannot be undone.
  • Transparency: A transparency mask is applied to the picture based on the color passed in param1. For example, if you pass 0x00FFFFFF (white color) in param1, all the white pixels in the original picture will be transparent in the transformed picture. This operation can be applied to bitmap or vector pictures. By default, if the param1 parameter is omitted, the color white (0x00FFFFFF) is set as the target color. This function is specially designed to handle transparency in pictures converted from the deprecated PICT format pictures, but can be used with pictures of any type. This transformation cannot be undone.

Here is an example of cropping a picture (the picture is displayed in the form with the “Truncated (non-centered)” format):

You want to set the white parts of a picture to transparent. To do this, you can use the following code:

TRANSFORM PICTURE(Pict1;Transparency;0x00FFFFFF) //0x00FFFFFF is white

You will get the following result:


COMBINE PICTURES
Picture Operators

Scale layers proportionally

Updated in Photoshop 21.0 (November 2019 release)

When transforming any layer type, dragging a corner handle now scales the layer proportionally by default, indicated by the Maintain Aspect Ratio button (Link icon) in the ON state in the Options bar. To change the default transform behavior to non-proportional scaling, simply turn OFF the Maintain Aspect Ratio (Link icon) button. The Shift key, while pressed, now acts as a toggle for the Maintain Aspect Ratio button. If the Maintain Aspect Ratio button is ON, the Shift key toggles it OFF while pressed and vice versa. Photoshop remembers your last transform behavior setting—proportional or non-proportional scaling—it will be your default transform behavior when you start Photoshop the next time.

Use the Maintain Aspect Ratio button (Link icon) in the Options bar to choose the default scaling behavior.

How do I switch back to the legacy transform behavior?

From the menu bar, choose Edit (Win)/Photoshop (Mac) > Preferences > General, then select Legacy Free Transform.

TheFree Transform command lets you apply transformations (rotate, scale,skew, distort, and perspective) in one continuous operation. Youcan also apply a warp transformation. Instead of choosing differentcommands, you simply hold down a key on your keyboard to switchbetween transformation types.

Note:

If you are transforminga shape or entire path, the Transform command becomes the TransformPath command. If you are transforming multiple path segments (butnot the entire path), the Transform command becomes theTransform Points command.

    • Choose Edit > Free Transform.

    • If you are transforming a selection, pixel-basedlayer, or selection border, choose the Move tool . Thenselect Show Transform Controls in the options bar.

    • If you are transforming a vector shape or path,select the Path Selection tool . Thenselect Show Transform Controls in the options bar.

    • To scale by dragging, do one of the following:
      • If the Maintain Aspect Ratio button (Link icon) is ON in the Options bar, drag a corner handle to scale the layer proportionally.
      • If the Maintain Aspect Ratio button (Link icon) is OFF in the Options bar, drag a corner handle to scale the layer non-proportionally.
      • Hold down the Shift key while transforming to toggle between proportional and non-proportional scaling behavior.
    • To scale numerically, enter percentages in the Width and Height text boxes in the options bar. Click the Link icon to maintain the aspect ratio.

    • To rotate by dragging, move the pointer outside the bounding border (it becomes a curved, two‑sided arrow), and then drag. Press Shift to constrain the rotation to 15° increments.

    • To rotate numerically, enter degrees in the rotation text box in the options bar.

    • To distort relative to the center point of the bounding border, press Alt (Windows) or Option (Mac OS), and drag a handle.

    • To distort freely, press Ctrl (Windows) or Command (Mac OS), and drag a handle.

    • To skew, press Ctrl+Shift (Windows) or Command+Shift (Mac OS), and drag a side handle. When positioned over a side handle, the pointer becomes a white arrowhead with a small double arrow.

    • To skew numerically, enter degrees in the H (horizontal skew) and V (vertical skew) text boxes in the options bar.

    • To apply perspective, press Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS), and drag a corner handle. When positioned over a corner handle, the pointer becomes a gray arrowhead.

    • To warp, click the Switch Between Free Transform And Warp Modes button in the options bar. Drag control points to manipulate the shape of the item or choose a warp style from the Warp pop‑up menu in the options bar. After choosing from the Warp pop‑up menu, a square handle is available for adjusting the shape of the warp.

    • To change the reference point, click a square on the reference point locator in the options bar.

    • To move an item, enter values for the new location of the reference in the X (horizontal position) and Y (vertical position) text boxes in the options bar. Click the Relative Positioning button to specify the new position in relation to the current position.

    Note:

    To undo the last handle adjustment, choose Edit > Undo.

  1. Do one of the following to commit the transformation:

    • Select a new tool.
    • Click a layer in the Layers panel. (This action auto-commits changes and also selects the layer.)
    • Click outside the canvas area in the document window.
    • Click outside the bounding box in the canvas area.
    • Press Enter (Windows) or Return (Mac OS), click the Commit button in the options bar, or double-click inside the transformation marquee.

    To cancel the transformation, press Esc or click the Cancel button in the options bar.

    Note:

    When you transform a bitmap image(versus a shape or path), the image becomes slightly less sharpeach time you commit a transformation; therefore, performing multiplecommands before applying the cumulative transformation is preferableto applying each transformation separately.

Transform Picture

More like this