CameraGenerateThumbnail (Function) In french: CaméraGénèreMiniature
Warning
From version 27, CameraGenerateMiniature is kept for backward compatibility. This function is replaced by CameraGenerateThumbnail.
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 VideoGenerateThumbnail.
sPhoto is string = CameraRunApp(viPictureCapture) IF NOT ErrorOccurred THEN bThumbnail is boolean bThumbnail = CameraGenerateThumbnail(sPhoto, ... fExtractPath(sPhoto, fDirectory + fFile) + "_thumb.jpg") END
Syntax
Generating an auto-sized thumbnail of a photo or video Hide the details
<Result> = CameraGenerateThumbnail(<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 more details on the error, use ErrorInfo.
<Source>: Character string Full path of photo or video for which a thumbnail will be generated. For a video, the file must be in a shared location of the device (on the sdcard for example). <Destination>: Character string Full path of the file where the thumbnail will be saved.
Generating the thumbnail of a photo with a given size Hide the details
<Result> = CameraGenerateThumbnail(<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 more details on the error, use ErrorInfo.
<Source>: Character string Full path of photo or video for which a thumbnail will be generated. For a video, the file must be in a shared location of the device (on the sdcard for example). <Destination>: Character string Full path of the file where the thumbnail will be saved. <Width>: Integer Width (in pixels) of thumbnail to generate. <Height>: Integer Height (in pixels) of thumbnail to generate. Business / UI classification: UI Code Component: wd280android.jar
|
|
|
|