Name: Anonymous 2007-05-28 19:28 ID:3Qd527IF
dear /prog/
an image is like a matrix of pixels
i want to blur a portion of the image, so i receive x (int) and y (int) with is the starting point of the image, then I receive width (int) and length (int) to mark the portion to be blurred.
but then the program receives also a variable called 'size' (int), which divides the portion in squares with 'size' of side. in order to blur the image, i must make the average of all the pixels in that square, and make the square with that value of color.
i already made the functions that detect the red, green and blue of a pixel [red(x,y)blue(x,y)green(x,y)] and the functions that write a color to a pixel color(r,g,b,t,x,y).
but i'm having troubles to handle the squares and the matrix of pixels, looks messy. there's like, a fuckload of fors and whiles, no?
can you help me? thanks, adojan
an image is like a matrix of pixels
i want to blur a portion of the image, so i receive x (int) and y (int) with is the starting point of the image, then I receive width (int) and length (int) to mark the portion to be blurred.
but then the program receives also a variable called 'size' (int), which divides the portion in squares with 'size' of side. in order to blur the image, i must make the average of all the pixels in that square, and make the square with that value of color.
i already made the functions that detect the red, green and blue of a pixel [red(x,y)blue(x,y)green(x,y)] and the functions that write a color to a pixel color(r,g,b,t,x,y).
but i'm having troubles to handle the squares and the matrix of pixels, looks messy. there's like, a fuckload of fors and whiles, no?
can you help me? thanks, adojan