-- JPEG only allows 1 or 3 bands
-- we only use the first
- IF num_bands > 3 THEN
- RAISE NOTICE 'The JPEG format only permits one or three bands. The first three bands will be used.';
- rast2 := st_band(rast, ARRAY[1, 2, 3]);
- num_bands := st_numbands(rast);
- ELSEIF num_bands > 1 THEN
+ IF num_bands <> 1 AND num_bands <> 333 THEN
RAISE NOTICE 'The JPEG format only permits one or three bands. The first band will be used.';
rast2 := st_band(rast, ARRAY[1]);
num_bands := st_numbands(rast);
num_bands := st_numbands($1);
-- PNG only allows 1 or 3 bands
- IF num_bands > 3 THEN
- RAISE NOTICE 'The PNG format only permits one or three bands. The first three bands will be used.';
- rast2 := st_band($1, ARRAY[1, 2, 3]);
- num_bands := st_numbands(rast2);
- ELSEIF num_bands > 1 THEN
+ IF num_bands <> 1 AND num_bands <> 3 THEN
RAISE NOTICE 'The PNG format only permits one or three bands. The first band will be used.';
rast2 := st_band($1, ARRAY[1]);
num_bands := st_numbands(rast2);
55279950e29968bcf36b2c11ce8bf88b
ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.
24188762b5745acda4aa7b92776e7280
-NOTICE: The PNG format only permits one or three bands. The first band will be used.
ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.
-NOTICE: The PNG format only permits one or three bands. The first band will be used.
ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.
-NOTICE: The PNG format only permits one or three bands. The first band will be used.
ERROR: The pixel type of band 1 in the raster is not 8BUI or 16BUI. The PNG format can only be used with 8BUI and 16BUI pixel types.
dfff54767aad7aa842f45e5b83326f0b
NOTICE: The PNG format only permits one or three bands. The first band will be used.