Question delaing with resizng of Image

Last post 05-10-2005 10:35 AM by alewis25. 0 replies.

Sort Posts:

  • Question delaing with resizng of Image

    05-10-2005, 10:35 AM
    • Participant
      1,945 point Participant
    • alewis25
    • Member since 03-16-2004, 12:27 PM
    • Posts 394

    I have a jpg that I dynamically resize and format to png format.

    The png looks nice but the file size is double the origanl jpg image.Is there a way to have the file size not be doulbe,because if i go into fireworks and convert it the png is always smaller in file size?

     

    here is my code

    <code>

    Dim dummyCallBack As System.Drawing.Image.GetThumbnailImageAbort

    dummyCallBack = New _

    System.Drawing.Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)

    Dim fullSizeImg As System.Drawing.Image

    ' Dim fs As FileStream = File.OpenRead("C:\Images\test.jpg")

    'Dim jpeg As System.Drawing.Image

    ' jpeg.FromStream(fs)

    fullSizeImg = System.Drawing.Image.FromFile(fileLocation)

    Dim thumbNailImg As System.Drawing.Image

    thumbNailImg = fullSizeImg.GetThumbnailImage(300, 200, _

    dummyCallBack, IntPtr.Zero)

    thumbNailImg.Save(Server.MapPath("new.png"), ImageFormat.Png)

     

Page 1 of 1 (1 items)