Menu

Full resolution

2003-05-19
2003-05-29
  • Jan Emil Christiansen

    How do I change
    thumbnail = image.GetThumbnailImage
    to get full resolution pictures?

     
    • Kirby Turner

      Kirby Turner - 2003-05-20

      Image.GetThumbnailImage() is a .NET Framework call.  You can read more about it from the Framework documentation at:

      ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemDrawingImageClassGetThumbnailImageTopic.htm

      That said, the variable image is the full size image.  You don't need to do anything to get the full size image.  The code: thumbnail = image; would give you the full res picture.

      Hope that helps.

      -KIRBY

       
    • Jan Emil Christiansen

      I do not think I get full resolution.
      If I use
      http://www.dotnetforum.dk/forum/showpost.aspx?PostID=47
      the resolution are better.

       
    • Jan Emil Christiansen

      Maybe you can make it as a config setting.

      image.GetThumbnailImage compress the pictures - faster loadtime, but lower resolution.

      http://www.freelancefotograf.dk/album/

      Regards
      Jan Emil Christiansen

      // Aspect ratio logic provided by Bryce Jasmer.
      float aspect = image.PhysicalDimension.Width / image.PhysicalDimension.Height;
      if ( aspect <= 1.0 ) // Portrait
      {   
          Size newSize = new Size((int)(maxDimension * aspect),  maxDimension);
          thumbnail = new Bitmap(image, newSize);
      }
      else // Landscape
      {
          Size newSize = new Size(maxDimension, (int)(maxDimension / aspect));
          thumbnail = new Bitmap(image, newSize);
      }

       
      • Kirby Turner

        Kirby Turner - 2003-05-29

        Thanks.  I now understand.  I will add the code soon.  Thanks again.

         

Log in to post a comment.

MongoDB Logo MongoDB