Save a downscaled version of the photo

Use this method if you need a downscaled versions of the photo. An optional argument can be passed with a size hint. The thumbnail will try to fit the provided size hint and maintain its aspect ratio.

Its good practice to provide a sizehint if you know what size the thumbnail should be. The sizehint will be interpreted as points.

<CameraView ux:Name="Camera" />
<JavaScript>
    Camera.capturePhoto()
        .then(function(photo) {
            var sizehint = {
                width: 128,
                height: 128
            };
            photo.saveThumbnail(sizehint)
                .then(function(outputFilePath) {
                    console.log("Thumbnail saved to: " + outputFilePath);
                    photo.release();
                })
                .catch(function(err) {
                    photo.release();
                })
        })
        .catch(function(err) { });
</JavaScript>

Location

Namespace
Fuse.Controls
Package
Fuse.Controls.CameraView 2.9.1