4D v15

TRANSFORM PICTURE

Home

 
4D v15
TRANSFORM PICTURE

TRANSFORM PICTURE  


 

 

TRANSFORM PICTURE ( picture ; operator {; param1 {; param2 {; param3 {; param4}}}} )

Originally introduced in 4D v14 R2

The TRANSFORM PICTURE command ("Pictures" theme) accepts the new Transparency constant in the operator parameter to allow custom transparency to be applied in transformed pictures.

This feature is specially designed to handle transparency in pictures converted from the deprecated PICT format pictures, but can be used with pictures of any type.

The new constant has been added to the "Picture Transformation" theme. When it is passed, only param1 can be used:

operator (value)param1param2param3param4Values
Transparency (102)RGB color---hexadecimal
  • 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.

Example  

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:

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (standard edition) ( 4D v15)