PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Required Android version
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Generates a thumbnail of the specified photo or video. This thumbnail is generated in JPEG format.
Remarks:
  • If photos must be used in Android applications, we advise you to work with thumbnails and not with the initial photos taken by the device.
  • This function is equivalent to VideoGenerateMiniature.
Example
sPhoto is string = CameraRunApp(viPictureCapture)
IF NOT ErrorOccurred THEN
bThumbnail is boolean
bThumbnail = CameraGenerateMiniature(sPhoto, ...
fExtractPath(sPhoto, fDirectory + fFileName) + "_thumb.jpg")
END
Syntax

Generating an auto-sized thumbnail of a photo or video Hide the details

<Result> = CameraGenerateMiniature(<Source> , <Destination>)
<Result>: Boolean
  • True if the generation was performed. The thumbnail height will be 96 pixels and its width will be calculated according to the width/height ratio of the source image or video.
  • False if an error occurred. In this case, the ErrorOccurred variable is set to False. To get the details of the error, use ErrorInfo.
<Source>: Character string (with quotes)
Full path of photo or video for which a thumbnail will be generated. For a video, the file must be found in a shared location of device (on the sdcard for example).
<Destination>: Character string (with quotes)
Full path of file where the thumbnail will be saved.

Generating the thumbnail of a photo with a given size Hide the details

<Result> = CameraGenerateMiniature(<Source> , <Destination> , <Width> , <Height>)
<Result>: Boolean
  • True if the generation was performed,
  • False if an error occurred. In this case, the ErrorOccurred variable is set to False. To get the details of the error, use ErrorInfo.
<Source>: Character string (with quotes)
Full path of photo or video for which a thumbnail will be generated. For a video, the file must be found in a shared location of device (on the sdcard for example).
<Destination>: Character string (with quotes)
Full path of file where the thumbnail will be saved.
<Width>: entier
Width (in pixels) of thumbnail to generate.
<Height>: entier
Height (in pixels) of thumbnail to generate.
Remarks

Required Android version

This function is only available on devices with Android version 2.2 or higher (API level 8).
A fatal error occurs if the function is used with an earlier system version.
To determine the version of Android the application is running on, use SysAndroidVersion.
Component : wd260android.jar
Minimum version required
  • Version 22
Comments
Click [Add] to post a comment