5 Replies - 15465 Views - Last Post: 21 November 2008 - 01:29 AM Rate Topic: -----

#1 michaeltjia  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 04-November 08

How to Load the image using 300 DPI resolution

Post icon  Posted 19 November 2008 - 09:04 PM

Hi, guys,

Do you know how to load an image in .Net Framework 3.5 with high resolution? as long as i know, the default setting in .Net for resolution image only 72 dpi, anyone know how to increase the resolution?

Thanks for your help,

Thanks and Best Regards,

Michael
Is This A Good Question/Topic? 0
  • +

Replies To: How to Load the image using 300 DPI resolution

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 6489
  • View blog
  • Posts: 23,571
  • Joined: 12-June 08

Re: How to Load the image using 300 DPI resolution

Posted 20 November 2008 - 12:51 PM

http://msdn.microsof...ng.encoder.aspx

Or.. the bitmap class has a "SetResolution" that would work.
Was This Post Helpful? 0
  • +
  • -

#3 michaeltjia  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 04-November 08

Re: How to Load the image using 300 DPI resolution

Posted 20 November 2008 - 08:48 PM

Hi, how to set the bitmap resolution? i already try it, for an example :


						bm = new Bitmap(pictureBox1.Image);
			bm.SetResolution(300, 300);
			Image image1 = new Bitmap(bm);
			pictureBox1.Image = image1;
			pictureBox1.Refresh();




it is right or not? because, after i check it, the image in picturebox has same resolution, the resolution before and after i put in bitmap doesn't change, can you help me?

Thanks,

Michael

This post has been edited by michaeltjia: 20 November 2008 - 08:50 PM

Was This Post Helpful? 0
  • +
  • -

#4 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 971
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: How to Load the image using 300 DPI resolution

Posted 21 November 2008 - 12:55 AM

View Postmichaeltjia, on 20 Nov, 2008 - 07:48 PM, said:

Hi, how to set the bitmap resolution? i already try it, for an example :

bm = new Bitmap(pictureBox1.Image);
bm.SetResolution(300, 300);
Image image1 = new Bitmap(bm);
pictureBox1.Image = image1;
pictureBox1.Refresh();



it is right or not? because, after i check it, the image in picturebox has same resolution, the resolution before and after i put in bitmap doesn't change, can you help me?

Thanks,

Michael

Well, you copy the old image and set the resolution on the new bitmap. Then you create a new bitmap using the modified bm and copy it back to the picturebox. The new bitmap, with the old image in it, will have the default resolution.

Why not copy the modified bm back to the picture box directly?
bm = new Bitmap(pictureBox1.Image);
bm.SetResolution(300, 300);
pictureBox1.Image = bm;
pictureBox1.Refresh();


Was This Post Helpful? 0
  • +
  • -

#5 michaeltjia  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 04-November 08

Re: How to Load the image using 300 DPI resolution

Posted 21 November 2008 - 01:03 AM

Hi, n8wxs, thanks for your explanation, really appreciate it.

Btw, do you know how to stitching images, i already try using Matrox Tool for stitch image, but the result is not good if there is a different contrast, brightness, etc in each image, do you know maybe there is a good tool that can stitch image automatically in C# ?

Thanks,

Michael
Was This Post Helpful? 0
  • +
  • -

#6 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 971
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: How to Load the image using 300 DPI resolution

Posted 21 November 2008 - 01:29 AM

Sorry, no I don't. :(
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1