Gdi+

Aquila
08-31-2006, 01:11 PM
Does anyone know how I can change the resolution of an image I create using GDI+

I.E.


dim img as new system.drawing.image = new bitmap(1024,768)
dim gph as new system.drawing.graphics = system.drawing.graphics.fromimage(img)
dim fnt as new font("courier", 10)
dim pn as new system.drawing.pen(color.black)
gph.clear(color.white)
gph.Drawstring("Blah blah blah",fnt,pn.brush,10,10)
SomePicturebox.image = img
gph.dispose
img.dispose


By default I think the image is in 96DPI... how would I decrease or increase the DPI (resolution)

Thanks.

Aquila
08-31-2006, 01:41 PM
I'm an idiot, I can't set the resolution on the bitmap itself it's a grid of pixels...

BUT... How can I save the resultion on the saved image file. Like one would do in paintshop?

JNewt
08-31-2006, 02:59 PM
Bitmap objects have a SetResolution method which allow you to set the DPI.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum