Results 1 to 2 of 2

Thread: How do I blur an image?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Post

    Hi,

    I have my doubts about this one being answered. I would like to blur the content of a picture box like on Paint Shop Pro and many other image editors. Any ideas?

    Richard

  2. #2
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Well, I had my ideas awhile ago on how to do it, although to be honest I never tried the code. Take two pictureboxes, and put the picture you want to blur in one of them. The other one will be used to draw in. Do not draw on the source picture, because... I don't want to explain it but it won't be good . Your code is going to be hidiously slow, which is one reason I never bothered to make it myself (why so slow? Heh, it's vb. Go learn some C!) Set up two For...Next statements that go from 0 to the width and heights of the picture, and you want to take the color of the pixel you're going to blur (Use the GetPixel API), and combine it with the color of a pixel(s) around it (the pixel(s) to the right: blur right, pixel(s) to the left: blur left...).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width