Tag Archives: resize

 

 
2

Posted on 26. Jan, 2010 by Wim Haanstra.

 

For a project I am working on, I was looking for a good way to resize images in a few different ways. I have done image resizing before, but it really feels that I am re-inventing the wheel every time I do this. So now I decided to write a nice static method which can resize an Image to certain dimensions and outputs an Image object again.

The method requires 3 parameters:

1. An image object. I hope you know how to load a file in an Image object (hint: FromFile).
2. A Resolution object, being nothing more than a small class I created, which also contains the width and the height.
3. The mode you want to use for resizing the image. I explained the modes in the enum listed below.

It probably isnt the neatest code you’ve ever seen, so if you have any comments, please let me know. Code and more explanation after the break… (more…)

Continue Reading
 

 

WallPaper3 Stats

Latest Images

What I'm Doing...

  • The end of working here is getting closer and closer. Is it bad to do a countdown? 6.5 days... 4 hrs ago
  • Collecting my tax numbers, getting ready to file them. A lot of work.. 15 hrs ago
  • Care to twitter about the WallPaper 3 release? http://itunes.apple.com/nl/app/wallpaper/id292397567?mt=8 is the link to the app. 22 hrs ago
  • Ow, I hate switching between PC and Mac everytime I need Photoshop or Visual Studio. Why is VS so slow in Parallels (5)? 22 hrs ago
  • WallPaper is reduced in price! $0.79, until WallPaper Free is released! 22 hrs ago
  • I installed Tweetie on my mac. Got it with the MacHeist deal. It looks really nice! 1 day ago
  • Making some sort of banner. Should probably do more advertising. 1 day ago
  • Finishing up projects @ my current employer, typing a lot in Word... 1 day ago
  • More updates...

Posting tweet...

Powered by Twitter Tools