Scales images in a scene object to reduce storage size and resolution.
Syntax
scene ST_ScaleImage(scene sc, cstring name, float8 scale);Parameters
| Parameter | Type | Description |
|---|---|---|
sc | scene | The scene object. |
name | cstring | The name of the image to scale. To scale all images in the scene object, pass a pair of single quotation marks (''). |
scale | float8 | The scale factor. Valid values: (0, 1). |
Description
ST_ScaleImage reduces the size of one or all images in a scene object. A lower scale value produces a smaller file with lower resolution.
Passing''as thenameparameter scales all images in the scene object. To scale a single image, specify its exact name.
The images below show the effect of different scale values:
Original image with scale of 1.0

Image after scale-down with scale of 0.125

Examples
Scale all images in the scene column to 10% of their original size:
SELECT ST_AsText(ST_ScaleImage(scene, '', 0.1)) from t;Output:
{"type" : "gltf", "content" : {"accessors":[{"bufferView":0,......