Schema
Owner
postgres
Descriptions
args: rast, nbands, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.
Options
Option | Value |
---|---|
Returns |
bytea |
Language |
|
Parameters |
rast public.raster nbands integer [] quality integer |
Definition
CREATE OR REPLACE FUNCTION public.st_asjpeg (
rast public.raster,
nbands integer [],
quality integer
)
RETURNS bytea AS
$span$
DECLARE
quality2 int;
options text[];
BEGIN
IF quality IS NOT NULL THEN
IF quality > 100 THEN
quality2 := 100;
ELSEIF quality < 10 THEN
quality2 := 10;
ELSE
quality2 := quality;
END IF;
options := array_append(options, 'QUALITY=' || quality2);
END IF;
RETURN st_asjpeg(st_band($1, $2), options);
END;
$span$
LANGUAGE 'plpgsql'
IMMUTABLE
RETURNS NULL ON NULL INPUT
SECURITY INVOKER
COST 100;
COMMENT ON FUNCTION public.st_asjpeg(rast public.raster, nbands integer [], quality integer)
IS 'args: rast, nbands, quality - Return the raster tile selected bands as a single Joint Photographic Exports Group (JPEG) image (byte array). If no band is specified and 1 or more than 3 bands, then only the first band is used. If only 3 bands then all 3 bands are used and mapped to RGB.';
This file was generated with SQL Manager for PostgreSQL (www.pgsqlmanager.com) at 13/03/2014 13:23 |