Click here to Skip to main content
15,912,072 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: Bitmap blur problem Pin
Naturality8-Jun-08 13:11
Naturality8-Jun-08 13:11 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 18:58
Tim Craig8-Jun-08 18:58 
GeneralRe: Bitmap blur problem [modified] Pin
Naturality9-Jun-08 4:44
Naturality9-Jun-08 4:44 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 9:05
Tim Craig9-Jun-08 9:05 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 9:11
Naturality9-Jun-08 9:11 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 10:06
Naturality9-Jun-08 10:06 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 14:32
Tim Craig9-Jun-08 14:32 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 15:10
Tim Craig9-Jun-08 15:10 
Ok, courtesy of Wikipedia I've brushed up on Gaussian blurring. Cool | :cool: You're trying to replace each pixel, well at last those not on an edge with a weighted average of itself and the 8 pixels surrounding it. You have your weights in the array and are multiplying the pixel by the weight and diving by the sum of the weights (16). Two things. First and most glaring is why do you divide the blurred values by "size", 9 on your case? That's going to make things dark as you just cut each pixel value to 1/9 of its value, something less than 23 maximum out of the possible 255 if I did that right. Second, you'd be more accurate to do the division after you've fully accumulated the 9 weighted pixel values. The way you have it, you get a little truncation for each of the 9. If you wait until the end, you only get the truncation once. So get rid of the division by 16 in the loop and replace "size" by 16 at the end.

Now to figure out how you're getting the 9 pixels to average. All I know for sure is that I'm 99.9% sure what you're doing isn't right. Suspicious | :suss:

If you don't have the data, you're just another a**hole with an opinion.

GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 15:43
Naturality9-Jun-08 15:43 
GeneralRe: Bitmap blur problem Pin
Christian Graus9-Jun-08 17:00
protectorChristian Graus9-Jun-08 17:00 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 17:06
Naturality9-Jun-08 17:06 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 17:27
Tim Craig9-Jun-08 17:27 
GeneralRe: Bitmap blur problem Pin
Naturality9-Jun-08 17:49
Naturality9-Jun-08 17:49 
GeneralRe: Bitmap blur problem Pin
Christian Graus9-Jun-08 19:15
protectorChristian Graus9-Jun-08 19:15 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 20:32
Tim Craig9-Jun-08 20:32 
GeneralRe: Bitmap blur problem Pin
Tim Craig9-Jun-08 20:35
Tim Craig9-Jun-08 20:35 
GeneralRe: Bitmap blur problem Pin
Christian Graus10-Jun-08 4:03
protectorChristian Graus10-Jun-08 4:03 
GeneralRe: Bitmap blur problem Pin
Naturality10-Jun-08 4:24
Naturality10-Jun-08 4:24 
GeneralRe: Bitmap blur problem Pin
Tim Craig10-Jun-08 9:53
Tim Craig10-Jun-08 9:53 
GeneralRe: Bitmap blur problem Pin
Naturality10-Jun-08 10:32
Naturality10-Jun-08 10:32 
GeneralRe: Bitmap blur problem Pin
Naturality10-Jun-08 11:51
Naturality10-Jun-08 11:51 
GeneralRe: Bitmap blur problem Pin
Naturality10-Jun-08 13:15
Naturality10-Jun-08 13:15 
GeneralRe: Bitmap blur problem Pin
Tim Craig10-Jun-08 14:55
Tim Craig10-Jun-08 14:55 
GeneralRe: Bitmap blur problem Pin
Tim Craig12-Jun-08 18:35
Tim Craig12-Jun-08 18:35 
GeneralRe: Bitmap blur problem Pin
Naturality13-Jun-08 11:41
Naturality13-Jun-08 11:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.