Click here to Skip to main content
15,899,026 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: Bitmap blur problem Pin
Christian Graus7-Jun-08 16:11
protectorChristian Graus7-Jun-08 16:11 
AnswerRe: Bitmap blur problem Pin
Tim Craig7-Jun-08 19:46
Tim Craig7-Jun-08 19:46 
GeneralRe: Bitmap blur problem [modified] Pin
Naturality8-Jun-08 2:29
Naturality8-Jun-08 2:29 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 7:56
Tim Craig8-Jun-08 7:56 
GeneralRe: Bitmap blur problem Pin
Naturality8-Jun-08 11:11
Naturality8-Jun-08 11:11 
GeneralRe: Bitmap blur problem Pin
Tim Craig8-Jun-08 11:25
Tim Craig8-Jun-08 11:25 
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 
Ok, a few more rookie gotchas. RGBTRIPLE is a struct. In get_pixel() and clear_pixel(), you want to operate on the pixel "colour" that you pass in. However, the way you've written it, you're working on a copy so you're changing nothing. You need to declare it as a pointer or a reference, RGBTRIPLE* pColour or RGBTRIPLE& colour. If you do it as a reference, you don't need to change the code inside the functions to pointer notation. The same thing applies to merge in avg(), you're working on a copy inside the function the passed parameter doesn't change.

I also don't think you're applying the kernel to your image properly. I'm not up on gaussian off the top of my head but you need to apply it to every pixel and its immediate neighbors so bumping the index of the loops by 3 each pass doesn't do it. Usually, applying a kernel you need a source image and then build a spearate destination image, otherwise you'd be using pixels you've already changed as you progress through.

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

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 
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 

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.