WebImage resize (How to)

Image Resize.

So how is people handling resizing images?

I get an image from a URL in a WebPicture or ImageView, and then if I need to resize it to the right size, how do I accomplish this?

I know this should be s server side thing, but for minor tweaks it is an over kill… Any ideas would be greatly appreciated.

Complicated question… At this point, my preferred way of doing things where particular pictures need to be different sizes in the interface is serving the pictures with special URLs and having the server create and cache resized images as needed. So the URL path for a 512 x 300 space might look like:


Special handler sees if it has that image already saved to disk, and ships it out. If not, creates and saves, then ships it out.

Overkill, probably. Does what I want efficiently with image heavy layouts, easily.


How do you crate them on the server? Do you have code to share?

Studio Stable Graphics plugin for the console app resize. You could resize with DrawPicture (lower quality results) or MBS (more control, pricier if you don’t need other stuff in it).

Studio Stable Web Essentials for the code to automatically size to fit, fill, etc.


The caching stuff will make it into Web Essentials when I’m done tweaking it every other day. It’s still a little fluid right now.


WebImageViewTD in Web Custom Controls let’s you resize on the client if you don’t want to re-download image data with each resize.

[code] Dim aPicture as Picture

  aPicture = new Picture(me.Width,me.Height)
  aPicture.graphics.drawpicture mmPicture, 0, 0, me.width, me.height, 0, 0,mmPicture.width,mmPicture.height
  me.Picture =CType(aPicture, WebPicture)[/code]
1 Like