Resize Image Antialiasing

BlitzPlus Forums/BlitzPlus Programming/Resize Image Antialiasing

Arem(Posted 2005) [#1]
When I resize an image, the edge is always tapered down to black. I have checked the edge of the image and there is no black on the side. Suggestions?


CS_TBL(Posted 2005) [#2]
Make a larger image, 1 pixel larger at all edges .. and copy the pixels that were meant to be the real border to the new border. Then resize it and cut the extra border again.. Haven't checked it, but I guess it could work. ^_^


NetGamer(Posted 2005) [#3]
See if
TFormFilter 1
has any effect. This will prevent bi-linear filtering during resizing (docs say TFormImage and RotateImage but this may apply to ResizeImage as well since TFormImage is just a richer version of rotate and resize).


CS_TBL(Posted 2005) [#4]
btw.. if you don't care for realtime, you can always make your own scaler!


Arem(Posted 2005) [#5]
TFormFilter doesn't hack it. I made a version that **works** by making it 10 pixels too wide and then cropping it. It's just sloppy though. Suggestions?


Arem(Posted 2005) [#6]
Since I was using this to make skinned windows, I resized the images to 20 pix larger than they needed to be in both directions and then just used drawimagerect to ignore the edge pixels.