what could i do to make a bitmap not sharp? (hehe, i don't know the opposite of sharp, even not in german). what do graphic programs do to make a bitmap sharp and the opposite? thanks
The opposite of sharpen is soften! I think the sharpness of an image is the clarity and distinctivness of different colours. So if you have a red background with a black line running through it, some of the red pixels will be darkened due to inaccuracies in the sampling of the image (kind of like an unwanted anti-aliasing effect). In order to soften an image, simply blend a pixel with those of its neighbours, the more you soften, the more you blend (and possibly in extreme cases, blend with the neighbours of neighbours). It is like having a camera slightly out of focus (often done in photography, it helps "remove" skin blemishes etc.). Sharpening an image is slightly more difficult. The algorithm you need to do this will need to identify the areas that should have a greater contrast, and then make the appropriate changes. Sharpening an image is akin to trying to rebuild a pixelated face! Information has been lost, and you need to try and guess what went missing. Mirno
hey, this is a great answer, thanks! but could you please explain a bit more how to do that in assembler? the only thing i want to do is to soften a bitmap. when i have a normal sharp bitmap and then soften it for example 5 times, i can just restore for example the 3rd step by repeating the operation only 3 times with the original bitmap. ok, so how should i start? i'm lookin forward for answers...
The Intel web site has information on this. I'd start HERE. It's always been hard for me to navigate their website, but I do remember seeing an article there. Search Google for '3 x 3 Convolution Filter Source Code.' You can do a number of effects with a convolution filter. To soften an image, add some of the color from the surrounding pixels.
For example, lets pretend that my ACSII art is a set of nine pixels. You could average the values of the pixels around the center (55/8), and add 30% of the difference of the center and the average to the center to get the new center value [3 + 30% * (3 - (55/8))]. By adjusting the percentage you adjust the softening/bluring of the image. You do this calculation for red, green, blue components of the pixel. Sorry, it sounds so complicated. :) This message was edited by bitRAKE, on 6/1/2001 1:07:59 PM
------------- | 4 | 8 | 2 | ------------- | 7 | 3 | 9 | ------------- | F | 1 | 9 | -------------