This project is read-only.

Image from memory/resources instead of disk

Dec 30, 2014 at 4:05 PM
How can I load an image onto a map / shapefile without having it on disk? It would be so much easier to keep images in resources and load them from there. I found some solution for this but it didn't support transparency.
Dec 30, 2014 at 9:21 PM
Buffer for in-memory images doesn't store alpha channel, so it won't be possible to have semi transparent pixels in it. Fully transparent pixels can be dealt with easily by setting Image.TransparencyColor and Image.UseTransparency color. As for ways to populate MapWinGIS Image from resource, there are several ones to try: init GDI+ bitmap from resource stream first and pass data pixel by pixel, Image.Serialize method (it can save pixels as base64 string), probably Image.SetImageBitsDC (I haven't tried it myslef).
Marked as answer by pmeems on 1/1/2015 at 3:32 AM