KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Arithmetic functions with pictures
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: January 31, 2003

Versions: 6.7.x and 6.8.x

In 4th Dimension, you can actually perform Arithmetic functions with pictures to resize a picture and get the size (dimensions) you want.

A list of picture operators is available at:
https://ftp.4d.com/aci_Technical_notes/ACIDOC/CMU/CMU02021.HTM

For example, if you wanted to resize a picture so that its width is 1024, you could use the following code:

PICTURE PROPERTIES(PixVar;width;height)
If (width>1024)
 $Div_Value:=1024/width
 PixVar:=PixVar*$Div_Value
End if