How to create a Bitmap object from a Graphics object? I would like to read pixels from my Graphics object. e.g. System.Drawing.BitMap.GetPixel ().
I am trying to find an empty area (all white or any color) inside a pdf document to write some graphics / image. I tried so, but it does not work. why is the following code not working as expected?
Bitmap b = new Bitmap(width, height, graphics);
int rgb = b.GetPixel(i, j).ToArgb();
(re-asking this question in the context of .net-only, removing other library dependencies)
source
share