T
Thomas
Hi all,
I've written an image resizing class so that I can generate thumbnails
and various image sizes on the fly.
The problem I'm having is that on about 70% of the thumbnails I
generate, I can see a 1 pixel border around the left and top edge.
Not a huge deal but it's aggravating. Not sure what was causing it, I
searched the net for code samples. Using code very similar to:
http://www.codeproject.com/csharp/imageresize.asp
(I tried this code, too, and get similar results.)
Before I call DrawImage and save the new file, I added the following:
SolidBrush sb = new SolidBrush(System.Drawing.Color.Red);
graphic.FillRectangle(sb,destX,destY,destWidth,destHeight);
Sure enough, the left and top border is a 1 pixel red color, about 30%
transparent if I had to guess. I've stepped through the code and the
dimensions are all 100% correct.
Any ideas on how to fix this? Note that not all thumbnails I generate
are affected by this. I do have all the settings set to high quality.
Thanks,
Tom
I've written an image resizing class so that I can generate thumbnails
and various image sizes on the fly.
The problem I'm having is that on about 70% of the thumbnails I
generate, I can see a 1 pixel border around the left and top edge.
Not a huge deal but it's aggravating. Not sure what was causing it, I
searched the net for code samples. Using code very similar to:
http://www.codeproject.com/csharp/imageresize.asp
(I tried this code, too, and get similar results.)
Before I call DrawImage and save the new file, I added the following:
SolidBrush sb = new SolidBrush(System.Drawing.Color.Red);
graphic.FillRectangle(sb,destX,destY,destWidth,destHeight);
Sure enough, the left and top border is a 1 pixel red color, about 30%
transparent if I had to guess. I've stepped through the code and the
dimensions are all 100% correct.
Any ideas on how to fix this? Note that not all thumbnails I generate
are affected by this. I do have all the settings set to high quality.
Thanks,
Tom