Resize image for webpage

A

Arjen

Hi,

I want to resize an image on my server.
I tried a lot of samples... but all the time it does resize and saves the
images but I can not view the image insize a webbrowser.
With an imageviewer (desktop application) I can view the image. I believe
there is something wrong with the maximum colors...

This is what I have now...
Image originalBitmap = Image.FromFile("C:\temp\image.jpg", true);
Image result = originalBitmap.GetThumbnailImage(150, 100, null,
IntPtr.Zero);
result.Save("C:\temp\resize.jpg");

Hope that someone have a good working sample. I want to read in images...
jpg and then resize (and viewable in browser).

Thanks!
Arjen
 
A

Arjen

Hmmm, solves the problem.

result.Save(directory + "resize.jpg",
System.Drawing.Imaging.ImageFormat.Jpeg);

Tnx 2 myself,
Arjen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top