Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing an image and HighQualityBicubic
Message
From
21/05/2010 19:06:59
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Resizing an image and HighQualityBicubic
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01465537
Message ID:
01465537
Views:
107
I use this to resize an image:
            loGraphics = System.Drawing.Graphics.FromImage(loImage)
            loGraphics.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
            loGraphics.DrawImage(oImage, 0, 0, loImage.Width, loImage.Height)
This resizes with the highest quality. However, when doing that, this adds a border to the image. It is not easy to see. But, if look closer, you will see that there is a border. I thought I was doing something wrong. But, this seems to be normal. If you go at http://msdn.microsoft.com/en-us/library/k0fsyd4e.aspx and look at the two resized images on the right, you will see that there is a border. This is really irritating me. Because, when you have a white background and that the image is dropped over a white background, you can see that there is a border. At first, I didn't see it on my PC. But, using the laptop, where the intensity of the screen is different, I saw it immediately.

I am wondering what others are doing to avoid that.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform