This topic describes the ST_ScaleImage function. This function scales down the size of an image in a scene object.

Syntax

scene  ST_ScaleImage(scene sc, cstring name, float8 scale);

Parameters

ParameterDescription
scThe scene object.
nameThe name of the image. A pair of single quotation marks ('') indicates all images.
scaleThe scale of the image.

Description

This function scales down the size of the image in a scene object based on a given value. The value of the scale parameter falls in the range of (0, 1).

The name parameter specifies the name of the image. If this parameter is empty, the sizes of all images are scaled down.

A small value of the scale parameter indicates that the image occupies a small amount of storage and has a low resolution.
  • Original image with scale of 1.0Original image
  • Image after scale-down with scale of 0.125Image after scale-down

Examples

SELECT ST_AsText(ST_ScaleImage(scene, '', 0.1)) from t;
--------
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......