Category Archive for: Manipulating Color and Pixels with Visual Basic

Using Edge Detection Filters

You can use another type of custom filter to extract the edges of an image. Because an image contains both horizontal and vertical edges, the two types of edge detection filters d,etect the corresponding types of edges. The horizontal edge detection filter detects and extracts horizontal edges by subtracting a row of pixels above tne center pixel from the…

Read More →

Sharpening Images

Since the “basicoperation for smoothing an image is addition, the opposite operation will result in sharpening the image, The sharpening effect is more subtle than smoothing. but more common and more useful, Nearly every image published, especially in monochrome publications, must be sharpened to some extent. For an example of a sharpened image, see Figure 7,9. Sharpening an image…

Read More →

How the Image Application Works

Let’s start with a general discussion of the application’s operation before we getdown to the actual code. Once the image is loaded on a Picture Box  control, you can access the values of its pixels with the Point method, which returns a Long integer representing each pixel’s color. The basic color components must be extracted from this Long…

Read More →

VB6 at Work: The PaintPic Project

The PaintPic application, shown in Figure 7.S, lets you combine the pixels of the source (left) and destination (right) PictweBox controls with the various values of the RRsterop argument of the PaintPicture method. The eight sliders let you set the origin of the rectangle to be copied and its dimensions, the destination coordinates of the transfer, and the transfer’s…

Read More →

Using thePaintPidure Method

So far we’ve explored the Visual Basic methods for manipulating individual pixels. Manipulating an entire image pixel by pixel is a slow process. In some situations, you may need a quick way to copy an image or part of an image from one container to another. W~dows provides a powerful mechanism for moving pixels around, known as BitBlt (pronounced…

Read More →

Specifying Gradients with the RGB() Function

Another interesting application of the RGBOfunction is to generate gradients. When you move from one comer to another on the same side of the RGBcube (as from red to black or fromgreen to blue), one or more components change value. The colors along the path that connects any two points in the RGBcube form a gradient. To specify a…

Read More →

Manipulating Color and Pixels with Visual Basic

In the last chapter, we explored the methods and techniques for drawing· shapes. There are only three shape-drawing methods, but when coupled with the various properties of the PictureBox control or the Form object, they’re quite powerful and flexible. The examples you’ve seen illustrate how far you can go with Visual Basic’s drawing methods. This chapter explores Visual Basic’s two…

Read More →

Back to Top