Hi All,
I'd like to know if I can take the results of a MapServer Python mapscript
'mapImage.getBytes()' operation, and feed it into GDAL as a data source for
an in-memory raster? The MapServer docs state that the results of
'getBytes' in Python is a "string of binary data". I'm not sure if GDAL
Roger André wrote:
Hi All,
I'd like to know if I can take the results of a MapServer Python
mapscript 'mapImage.getBytes()' operation, and feed it into GDAL as a
data source for an in-memory raster? The MapServer docs state that the
results of 'getBytes' in Python is a "string of binary data
Hi Frank,
Thanks for the example. How can I specify alpha in that, for one of the
quantized 8-bit PNG's (with alpha) that MapServer produces?
They look like this:
Metadata:
Software=UMN Mapserver
Corner Coordinates:
Upper Left (0.0,0.0)
Lower Left (0.0, 256.0)
Upper Right ( 25
Roger André wrote:
Hi Frank,
Thanks for the example. How can I specify alpha in that, for one of the
quantized 8-bit PNG's (with alpha) that MapServer produces?
Roger,
In a way this is simplier. It is just a one band GDT_Byte file, so more
like the first example I gave. The palette can b
Hi Frank,
Ok, that makes sense. So for this to work, I will have to know (somehow)
what type of image mapserver is sending, and then instantiate a MEM dataset
with the correct parameters. Problem with that is that I can't think of a
good way to read what those parameters are out of the binary st
Roger André wrote:
Hi Frank,
Ok, that makes sense. So for this to work, I will have to know
(somehow) what type of image mapserver is sending, and then instantiate
a MEM dataset with the correct parameters. Problem with that is that I
can't think of a good way to read what those parameters
Hi Frank,
Ok, I agree with you that the MapServer doc says that the getBytes()
function "Returns the image contents as a binary buffer". And I see in
tiff_read.py that tiff_vsimem() function is supposed to "# Test reading a
tiff from a memory buffer (#2931)", but there must be a difference betwee