@Tony L Hi All,
I have a desktop app that allows the user to save images to the database, the images are used to display on our website. I would like to scale down the image before it is saved. I know I can use the graphics class to reduce the size / resolution, but how can I reduce the dpi so that the physical size of the image can reduce further as I do not need to print it out, lower dpi does not affect the image shown on the website.
Thanks in advance.
You do understand that lowering the dpi without changing the physical dimensions will actually increase the display size right?
72px @ 72dots per inch = 1”
72px @ 36 dots per inch = 2”
My guess from your note is that sometimes you are getting images that are 300dpi. In that case, you’ll want to do some math...
dim p as picture = original
dim sf as double = 72 / 300
Dim newpic as new picture(p.width*sf, p.height*sf)
Draw the picture onto that new image. It defaults to 72x72 dpi so you’ll get what you’re looking for.