IT Community - Software Programming, Web Development and Technical Support

DPI of an Image

This is a discussion on DPI of an Image within the C# Programming forums, part of the Software Development category; DPI of an Image How to get the Image Resolution...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-06-2008, 10:12 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default DPI of an Image

DPI of an Image

How to get the Image Resolution
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-06-2008, 10:15 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: DPI of an Image

yes ...you can get the Image Resolution by
Bitmap origImage=img

float resolution=origImage.HorizontalResolution;
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-06-2008, 10:17 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: DPI of an Image

thanks..but i found one issue here ....

While getting the "HorizontalResolution" its says 96 DPI..but if i opened the same image in photoshop it says 72 DPI...how can i fix
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-06-2008, 10:18 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: DPI of an Image

oh...but i didnt check with the Photoshop...i wil check
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-06-2008, 10:22 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: DPI of an Image

Can you try using

Graphics g = e.Graphics;
Bitmap bmp = new Bitmap("winter.jpg");
g.DrawImage(bmp, 0, 0);
resolution= g.DpiX

this will help
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-06-2008, 10:23 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: DPI of an Image

ok..i wil check and let u know...thanks in advance
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert image to other image format using CODEC in .NET 3.0 Mramesh C# Programming 0 02-07-2008 03:33 AM
How to create an image from panel background Image S.Vinothkumar C# Programming 1 10-22-2007 03:52 AM
Example of Image Upload hanusoft ASP and ASP.NET Programming 2 09-20-2007 10:59 PM
How do I preload an image? Pvinothkumar HTML, CSS and Javascript Coding Techniques 2 09-18-2007 10:25 PM
Image downloading Sivamurugan PHP Programming 2 07-16-2007 03:30 AM


All times are GMT -7. The time now is 01:35 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0