From: shelarcy <she...@ca...> - 2004-04-21 11:34:59
|
On Sun, 11 Apr 2004 16:22:23 +0200, Daan Leijen <daa...@xs...> wrote: >> I was making a Filter (Low pass Filter) programm in wxHaskell. >> [snip] >> >> im <- imageCreateFromBitmap bm >> pxe <- imageGetPixelBuffer im >> [snip] >> fillpixelBuffer pxe >> bm2 <- bitmapCreateFromImage im (-1) >> [snip] >> >> But these code doesn't work. >> >> Where is wrong? > > I think that when you get the pixelbuffer from an image, you get a fresh > copy > and you are not manipulating the image itself. So, you probably need to > use > "imageCreateFromPixelBuffer" to create a new "image" from the > pixelbuffer again. > (See the "PaintDirect" sample in the contrib directory) > > I hope this helps, > All the best, > Daan. I changed my programm under that advice, but programm doesn't work yet. I'm thinking that reason many time ... Do I misunderstand your message? let fillpixelBuffer pb = do mapM_ (drawLowpassFilter pb) (pixelPoint bsz 0) return pb px2 <- fillpixelBuffer pxe im2 <-imageCreateFromPixelBuffer px2 bm2 <- bitmapCreateFromImage im2 (-1) drawBitmap dc bm2 pointZero True [] -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |