tool to change image DPI

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I have some image coming from mac.
for some reason their DPI setting is screwing up their rendering.
how could I fix that?

My main concern is I want to fix the picture themselves as I'm not drawing
them but pass them as properties of 3rd party control...

Is there a free tool somewhere doing just that?
Apparently Paint.NET doesn't ...
 
If you draw the images using the GraphicsUnit.Pixel setting the DPI will be
ignored. Just using DrawImage without the finer settings makes the system
think too hard about what it's doing and the image will be scaled according
to DPI.

You can also use DrawImageUnscaled.

Alternatively you can modify the declared DPI using the SetResolution method
or resample the image completely, saving a copy. The GDI+ FAQ has an article
on changing resolution and cropping.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
If you draw the images using the GraphicsUnit.Pixel setting the DPI will
be ignored. Just using DrawImage without the finer settings makes the
system think too hard about what it's doing and the image will be scaled
according to DPI.

You can also use DrawImageUnscaled.
None of these is good because, as I told, I'm not drawing these images
myself, I'm passing them as property to a 3rd party control.
Alternatively you can modify the declared DPI using the SetResolution
method or resample the image completely, saving a copy. The GDI+ FAQ has
an article on changing resolution and cropping.
ha.. that's better ;-)
 
Back
Top