PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 miniature of the specified photo or video. This miniature is generated in JPEG format.
Notes:
  • If photos must be used in Android applications, we advise you to work with miniatures 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
bMiniature = CameraGenerateMiniature(sPhoto, ...
fExtractPath(sPhoto, fDirectory + fFileName) + "_thumb.jpg")
END
Syntax

Generating the miniature of a photo or video with automatic size Hide the details

<Result> = CameraGenerateMiniature(<Source> , <Target>)
<Result>: Boolean
  • True if the generation was performed. The height of the generated miniature will be equal to 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 find out the error details, use ErrorInfo.
<Source>: Character string (with quotes)
Full path of photo or video for which a miniature will be generated. For a video, the file must be found in a shared location of device (on the sdcard for example).
<Target>: Character string (with quotes)
Full path of file where the miniature will be saved.

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

<Result> = CameraGenerateMiniature(<Source> , <Target> , <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 find out the error details, use ErrorInfo.
<Source>: Character string (with quotes)
Full path of photo or video for which a miniature will be generated. For a video, the file must be found in a shared location of device (on the sdcard for example).
<Target>: Character string (with quotes)
Full path of file where the miniature will be saved.
<Width>: Integer
Width (in pixels) of miniature to generate.
<Height>: Integer
Height (in pixels) of miniature to generate.
Remarks

Required Android version

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