Image resampling in VB/ASP.NET

H

Harley

is there any way to manipulate images in vb.net in asp.net?
i have a 280x280pixel jpg file, and want to display it in 2 sizes, 280x280
and 70x70... without having to create 2 files... (actually there are some
100s files, dont want to duplicate them...)
any way to use an image class or something to resample the image and get the
stream as a jpg file displayed on an aspx file?
i know there were com components for ASP to do this, like ASPImage, but
cannot install custom components on my server.
 
K

Krissy

Harley said:
is there any way to manipulate images in vb.net in asp.net?
i have a 280x280pixel jpg file, and want to display it in 2 sizes, 280x280
and 70x70... without having to create 2 files... (actually there are some
100s files, dont want to duplicate them...)
any way to use an image class or something to resample the image and get the
stream as a jpg file displayed on an aspx file?
i know there were com components for ASP to do this, like ASPImage, but
cannot install custom components on my server.

You probably want something like this:

http://aspalliance.com/chrisg/default.asp?article=130

Use the single thumbnail browser and adapt to code to take in parameters for
the sizes you want.

I used something similar for a photo gallery site, it works fine and the
images look really good :)

But be careful with .bmp and .png files, they can have problems displaying
on a page.

See http://aspalliance.com/chrisg/default.asp?article=152 for more info.
 
K

Krissy

Krissy said:
You probably want something like this:

http://aspalliance.com/chrisg/default.asp?article=130

Use the single thumbnail browser and adapt to code to take in parameters for
the sizes you want.

I used something similar for a photo gallery site, it works fine and the
images look really good :)

But be careful with .bmp and .png files, they can have problems displaying
on a page.

See http://aspalliance.com/chrisg/default.asp?article=152 for more info.

On a side note I was initially using an image component, but stopped as the
company never replied to our emails about the product, so a bit of searching
around saved us $500 for a component by doing the coding ourselves :)
 
K

Kevin Spencer

You can do anything with ASP.Net that you can do with any other programming
technology. To manipulate images, use the System.Drawing namespace.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top