Solved

Progressive jpg while loading

Posted on 2008-06-26
2
338 Views
Last Modified: 2013-12-25
Hi

I've been using system.drawing to resize jpgs for a website. Is there any method in there for progressive browser display of the image while loading? I used to optimize images in Fireworks but now want to automate the task.

Thanks Paul
Private Sub CopyToDir(ByVal dimW As Integer, ByVal dimH As Integer, ByVal destn As String)

        Dim sourceBitmap As New Bitmap(currentImage)

 

        Dim destBitmap As New Bitmap(dimW, dimH)

        destBitmap.SetResolution(72, 72)

        Dim destGraphic As Graphics = Graphics.FromImage(destBitmap)

 

        destGraphic.DrawImage(sourceBitmap, 0, 0, _

         destBitmap.Width + 1, destBitmap.Height + 1)

 

 

        destBitmap.Save(destn, ImageFormat.Jpeg)

    End Sub

Open in new window

0
Comment
Question by:chiii0ut
2 Comments
 
LVL 10

Accepted Solution

by:
bluefezteam earned 250 total points
ID: 21874781
http://msdn.microsoft.com/en-us/library/system.drawing.imaging.encodervalue.aspx
"RenderProgressive Not used in GDI+ version 1.0. "

I'm sure this is because it renders progressive by default?
0
 
LVL 3

Author Closing Comment

by:chiii0ut
ID: 31470934
Thanks for the clarification
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now