[Gdal-dev] Managed GDAL API (CSharp) - Writing Bitmap to Dataset
Tamas Szekeres
szekerest at gmail.com
Sat May 3 14:40:02 EDT 2008
Hi,
Do you have any specific issues why Band.WriteRaster or
Dataset.WriteRaster doesn't work for you?
I guess those should work along with the pinned arrays provided by
LockBits pretty well.
Best regards,
Tamas
2008/5/3 Maksim Sestic <max at geoinova.com>:
>
> Hi all,
>
> I'm trying to figure out the opposite way of what GdalReadDirect.cs does,
> copying a bitmap back into the instantiated Dataset. Is there any example
> related to it?
>
> Here's what I'm trying to do - since GDAL doesn't support raster filters
> (i.e. Sharpen, Contrast, etc...) I'm using managed library to perform series
> of bitmap manipulations. Then I need to save changed bitmap back into the
> existing or newly created in-memory dataset. This is the "workflow":
>
> 1) Use managed GDAL API to open raster image file (raster image usually
> contains lots of metadata)
> 2) Leave instantiated Dataset object intact
> 3) Use direct-read method (as in GdalReadDirect.cs) to get the Bitmap object
> out of the Dataset
> 4) Apply some filters over the Bitmap
> 5a) Write Bitmap back into the already instantiated Dataset, preserving
> metadata structure, or...
> 5b) Write Bitmap into the newly instantiated Dataset
> 6) Use managed GDAL Dataset methods to write/flush raster to disk
>
> I'm stuck with step 5). I'm also aware that step 5) would take some
> additional resource-wasting but that's OK with me.
>
> Regards,
> Maksim Sestic
> --
> View this message in context: http://www.nabble.com/Managed-GDAL-API-%28CSharp%29---Writing-Bitmap-to-Dataset-tp17034804p17034804.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list