J
John Dann
I've never had much cause to read up in detail on GDI+ but there's a
small piece of a project where I need to add some annotation (let's
say just some small filled rectangles as markers) to a pre-existing
bitmap and then resave the bitmap. I've tried several ways of doing
this but they either don't work or give errors. Anyone able to help me
out please?
The sort of thing I'm doing is:
Dim MyBMP as Bitmap = Bitmap.Fromfile(MyFileLocation)
then I've tried eg
Dim gr as graphics = MyBMP.Creategraphics
but get a runtime error that I can't use a bitmap with indexed pixels.
I was then simply hoping to be able to say:
gr.FillRectangle(brushdetails, rectangledetails)
MyBMP.Save(AnnotatedFile)
I could go on with the various bits of code I've tried but while I'm
presuming that there is a simple approach to this, my attempts
obviously haven't hit on the right combination.
Thanks for any help.
JGD
small piece of a project where I need to add some annotation (let's
say just some small filled rectangles as markers) to a pre-existing
bitmap and then resave the bitmap. I've tried several ways of doing
this but they either don't work or give errors. Anyone able to help me
out please?
The sort of thing I'm doing is:
Dim MyBMP as Bitmap = Bitmap.Fromfile(MyFileLocation)
then I've tried eg
Dim gr as graphics = MyBMP.Creategraphics
but get a runtime error that I can't use a bitmap with indexed pixels.
I was then simply hoping to be able to say:
gr.FillRectangle(brushdetails, rectangledetails)
MyBMP.Save(AnnotatedFile)
I could go on with the various bits of code I've tried but while I'm
presuming that there is a simple approach to this, my attempts
obviously haven't hit on the right combination.
Thanks for any help.
JGD