This project is read-only.

ImageData - how to set the bitmap

Nov 13, 2010 at 5:27 AM

I'm trying to set the Bitmap of the DotSpatial.Data.ImageData object to an in-memory generated bitmap.

the code:

ImageData myI = new ImageData()

doesn't work because SetBitmap() method only sets the bitmap when InternalImage != null.

In the previous version of DotSpatial ImageData had a constructor with a .NET bitmap as a parameter. Is there any specific reason why the constructor was removed?




Nov 13, 2010 at 5:33 AM

OK, I figured it out.

I need to use the DotSpatial.Data.InRamImageData class.

Nov 13, 2010 at 12:01 PM

Great post, thanks for that tip! I had a similar problem, since I need to draw bitmap on top of other image


Nov 13, 2010 at 4:20 PM

Yes, hopefully we can get some documentation ready soon that will help people find their way a little easier =).  The original in-ram implementation was MWImageData, and I didn't really feel that "DotSpatialImageData" conveyed anything meaningful about what it did.  InRamImageData seemed like a good functional name.