ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Image Editor control (WINDEV Mobile)
  • Overview
  • Displaying an image in an Image Editor control
  • Getting the image displayed in the Image Editor control
  • WLanguage properties of Mobile Image Editor controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Handling Mobile Image Editor controls programmatically
Overview
WINDEV Mobile allows you to programmatically handle Mobile Image Editor controls.
You can handle the image displayed in the Mobile Image Editor control using the variable that represents the control.
Displaying an image in an Image Editor control
To display an image, simply assign it to the Image Editor control. You can use a file name or a variable of type Image.
For example:
  • direct assignment:
    IE_MyImage = "C:\Temp\MyImage.gif"
  • assignment using a variable:
    ImagePath = fCurrentDir() + "\MyImage.gif"
    IE_MyImage = ImagePath
  • assignment using a variable of type Image:
    MyImage is Image
    MyImage.Width = 500
    MyImage.Height = 100
    // Load from a file
    MyImage = dLoadImage("image.png")
    // Draw in the image
    dStartDrawing(MyImage)
    // Write a text
    dFont("Arial", 12, iNormal, 0)
    dText(4, 0, "Text in an Image control!")
    // End of drawing
    dEndDrawing(MyImage)
     
    // Assignment to a Mobile Image Editor control
    IE_MyImage = MyImage

Remark: A Mobile Image control can also be initialized from a Buffer or Text variable containing the value of the image in binary format.
Getting the image displayed in the Image Editor control
The image displayed and handled in the Image Editor control can be retrieved in a variable of type Image.
For example:
MyEditedImage is Image
MyEditedImage = IE_MyImage
Remark: The retrieved image contains only the changes validated by the user. Any ongoing changes that have not yet been validated will be ignored in the returned Image variable.
The image can then be saved using dSaveImagePNG, AlbumSave, etc.
WLanguage properties of Mobile Image Editor controls
For a complete list of WLanguage properties that can be used with Mobile Image Editor controls, see Mobile Image Editor control properties.
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 04/05/2023

Send a report | Local help