113{
116 uint16_t width;
117
118 if (PG_ARGISNULL(0)) PG_RETURN_NULL();
120
122 if ( ! raster ) {
123 PG_FREE_IF_COPY(pgraster, 0);
124 elog(ERROR, "RASTER_getWidth: Could not deserialize raster");
125 PG_RETURN_NULL();
126 }
127
129
131 PG_FREE_IF_COPY(pgraster, 0);
132
133 PG_RETURN_INT32(
width);
134}
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
uint16_t rt_raster_get_width(rt_raster raster)
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...