Gridview image resolution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JustRun
    New Member
    • Mar 2008
    • 127

    Gridview image resolution

    Hi all,

    I have a file button that enable user to choose the image, then save it to the datagridview,

    The problem is the resolution of the image After saving go down but before saving it good,

    why does it do this? how can I keep the original resolution?
    Regarding that I deal with the original size of the image.

    Thanks
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    If it is a JPG... JPGs are compressed. Then you are re-compressing it. To resolve that open it, rotate 90 degrees, rotate -90 degrees, then save.

    Comment

    • JustRun
      New Member
      • Mar 2008
      • 127

      #3
      It didn't work,

      Here is my code

      Code:
                      Image rayIamge = (Image)patientRaysTableDataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].FormattedValue;
                      rayIamge.RotateFlip(RotateFlipType.Rotate90FlipX);
                      rayIamge.RotateFlip(RotateFlipType.Rotate270FlipY);
                      frmRayImage objRayImage = new frmRayImage(rayIamge);
                      
                      objRayImage.ShowDialog();

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        It didn't work... Hummm... Follow the instructions.

        Originally posted by JustRun
        mage After saving go down
        Originally posted by tlhintoq
        rotate 90 degrees, rotate -90 degrees, then save.
        Doing a rotation on a jpg before showing it isn't going to change the fact that it was compressed a second time when saved. The damage is done.

        During your copy process Open, rotate, unrotate, save. In order to keep it from being compressed a second time before being saved.

        Comment

        • JustRun
          New Member
          • Mar 2008
          • 127

          #5
          Sorry for the late reply, and many thanks, It works now.

          Thank u :)

          Comment

          Working...