Changes between Version 32 and Version 33 of WKTRaster/SpecificationWorking03


Ignore:
Timestamp:
01/05/11 14:18:04 (14 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WKTRaster/SpecificationWorking03

    v32 v33  
    8282The most minimalistic versions of the function should assume band 1, 2 and 3 as being r, g, b and the quality equal to 75:
    8383
    84 ST_AsJPEG(raster) -quality = 75
     84 ST_AsJPEG(raster) -quality = 75
    8585
    8686A variant allow specifying the quality:
    8787
    88 ST_AsJPEG(raster, integer)
     88 ST_AsJPEG(raster, integer)
    8989
    9090Another variant should enable us to specify which band correspond to the r, the g and the b:
    9191
    92 ST_AsJPEG(raster, integer, integer, integer) - raster, rband, gband, bband, quality=75[[BR]]
    93 ST_AsJPEG(raster, integer, integer, integer, integer) - raster, rband, gband, bband, quality
     92 ST_AsJPEG(raster, integer, integer, integer) - raster, rband, gband, bband, quality=75
     93
     94 ST_AsJPEG(raster, integer, integer, integer, integer) - raster, rband, gband, bband, quality
    9495
    9596Another version should be designed to be used with a future ST_Band(raster) function. In this case there is no attempt to extract r, g or b band from any passed raster:
    9697
    97 ST_AsJPEG(raster, raster, raster)[[BR]]
    98 ST_AsJPEG(raster, raster, raster, integer) -with the quality param
     98 ST_AsJPEG(raster, raster, raster)
     99
     100 ST_AsJPEG(raster, raster, raster, integer) -with the quality param
    99101
    100102Another series should allow converting 1 band raster with pixel of type 8BUI to a grayscale JPEG (Carefull study of the GDAL behavior when converting a single band to JPEG should be done before confirming these functions):
    101103
    102 ST_AsJPEG(raster, "GRAYSCALE") - convert only band 1 with quality = 75[[BR]]
    103 ST_AsJPEG(raster, "GRAYSCALE", integer) - convert only band 1 with specified quality[[BR]]
    104 ST_AsJPEG(raster, integer, "GRAYSCALE") - allow specifying the band number to convert[[BR]]
    105 ST_AsJPEG(raster, integer, "GRAYSCALE", integer) - allow specifying the band number to convert and the quality
     104 ST_AsJPEG(raster, "GRAYSCALE") - convert only band 1 with quality = 75
     105
     106 ST_AsJPEG(raster, "GRAYSCALE", integer) - convert only band 1 with specified quality
     107
     108 ST_AsJPEG(raster, integer, "GRAYSCALE") - allow specifying the band number to convert
     109
     110 ST_AsJPEG(raster, integer, "GRAYSCALE", integer) - allow specifying the band number to convert and the quality
    106111
    107112Another series should allow converting 1 band raster of ANY pixel type to a grayscale JPEG. Pixel types different than 8BUI should be mapped according to specified min, max values and a mapping mode: "!MaxMinValue" (default) or "!MaxMinType".
    108113
    109 ST_AsJPEG(raster, "GRAYSCALE", min, max, text) - convert only band 1 with quality = 75[[BR]]
    110 ST_AsJPEG(raster, "GRAYSCALE", integer, min, max, text) - convert only band 1 with specified quality[[BR]]
    111 ST_AsJPEG(raster, integer, "GRAYSCALE", min, max, text) - allow specifying the band number to convert[[BR]]
    112 ST_AsJPEG(raster, integer, "GRAYSCALE", integer, min, max, text) - allow specifying the band number to convert and the quality
     114 ST_AsJPEG(raster, "GRAYSCALE", min, max, text) - convert only band 1 with quality = 75
     115
     116 ST_AsJPEG(raster, "GRAYSCALE", integer, min, max, text) - convert only band 1 with specified quality
     117
     118 ST_AsJPEG(raster, integer, "GRAYSCALE", min, max, text) - allow specifying the band number to convert
     119
     120 ST_AsJPEG(raster, integer, "GRAYSCALE", integer, min, max, text) - allow specifying the band number to convert and the quality
    113121
    114122
     
    132140----
    133141
    134 '''ST_AsGDALImage(raster, band int, type text, options text) -> bytea'''
     142'''ST_AsGDALRaster(raster, band int, type text, options text) -> bytea'''
    135143
    136144Use GDAL to convert the raster into one of the format suported by GDAL.