Tìm hiểu về Manipulating Images
Part III: Manipulating Images choices are actually a bit of misnomer All of the blurs are Gaussian blurs, but the Selective option is a specific type of Gaussian blur that pays attention to edges The default Gaussian blur without edge protection generally gives good results, but in images where you start seeing glow around edges, you may want to play with one of the other three options Dark/Bright Mask Grayscale — These options control which of the three images you want to use as the layer mask for the dark and bright image Typically you’ll want to stick with using the defaults here, but if you need to squeeze out some extra detail from some parts, changing these values can help Dark Takes Precedence — When Exposure Blend finishes, you’ll have three layers, two with masks, as shown in Figure 12-16 By default, the bright exposure layer is at the top of the stack However, this may yield results that are brighter than you want You can manually move the dark exposure layer up or you can send it straight to the top here by enabling this check box Auto-Trim Mask Histograms — Enabling this option is basically the same as opening the Levels dialog and clicking the Auto button on each of the exposure masks Scale Largest Image Dimension to — Type in an image size here in pixels, such as 800x600, and the tone-mapped image that comes out of Exposure Blend is proportionally scaled to be no larger than those dimensions This is useful if you want to test some settings before applying them to full-sized images FIGURE 12-15 The Exposure Blend dialog Once you have all the settings adjusted the way you like, click the OK button and Exposure Blend will its magic If the source files you’re using are large, this step might take a while, especially if you’re running GIMP on an older computer When it’s complete, though, you have an image window with your processed results in it The cool thing is that Exposure Blend doesn’t 342 Chapter 12: Enhancing Photos give you a flattened image as your result You actually get three layers, as shown in Figure 1216 The bottom layer is the normal exposure and the two layers above it are the bright and dark exposures, masked to reveal content that’s not apparent in the normal exposure FIGURE 12-16 When you run Exposure Blend, the result is an image with three layers The normal exposure image is at the bottom and the other two are masked above it What makes this so cool is that now you can manually tweak things with all of the tools available to you in GIMP to get more customized results You can reorder the exposure layers, tweak the masks in the Channels dockable dialog, or paint directly on each layer If you want to re-run Exposure Blend on your images to regenerate your masks or adjust their blur, you don’t have go through the process of selecting your images all over again Instead, choose Filters Exposure Blend Reset Blend Details This brings up a dialog like the one shown in Figure 12-17, which allows you to adjust all of the settings without needing to reselect your exposure images FIGURE 12-17 The Reset Blend Details dialog allows you to adjust tone mapping settings without reselecting your exposure images 343 Part III: Manipulating Images Because the process of bracketing requires that you take multiple photos, there’s a chance that all of those exposures will be slightly offset from one another, especially if you take the photos without a tripod Fortunately, Exposure Blend also includes features to help you align these images Choose Filters Exposure Blend Align Exposures and you’ll find four options: Bright — This sets the bright exposure layer to the difference blending mode to help you accurately align the bright exposure layer with the normal exposure layer Use the arrow keys on your keyboard with the Move tool (M) to move the layer one pixel at a time to nudge it into place Dark — This does the same as the Bright menu option, but for the dark exposure layer Off — Choose this option after you’ve aligned your layers to set everything back to the resulting tone-mapped image Trim Image to Overlap Area — If you adjust your layers to get them to line up, parts of the exposure layers no longer cover the normal exposure layer You can recognize this as a strip along the perimeter of you image that looks markedly darker or brighter than the rest of the image To rectify this, you can crop these protruding bits This menu option in Exposure Blend does this automatically for you Figure 12-18 shows the difference between an image that’s been tone mapped with Exposure Blend and the original, normal exposure image FIGURE 12-18 On the left, a digital photograph created with a single exposure; on the right, the same image tone mapped with Exposure Blend And with that, you’ve got a nicely tone-mapped image from a set of three bracketed photographs It’s important to note here that you’re not technically saving an HDR image If you save in GIMP’s native XCF format, the layers and their masks give you high dynamic range data, but it’s not really an HDR format And if you flatten the layers to save to another format like PNG or JPEG, the result is not HDR; it’s a regular image that’s been tone mapped with bracketed photos It’s a subtle distinction, but it’s definitely worth keeping in mind To have an HDR image, GIMP would have to support more than bits per channel and be able to save to an HDR-aware format such as OpenEXR There is not currently support for this in GIMP, but hopefully future versions that have tighter integration with GIMP’s new imaging library, GEGL, will add this support 344 Chapter 12: Enhancing Photos Summary This chapter covered the use of GIMP’s painting tools that are extremely useful in photo retouching work You saw how the Blur/Sharpen tool could be used to direct viewers to specific parts of your image and how the Smudge tool can drastically modify an image by extending it and softening its appearance You saw how the Dodge/Burn tool relates to the traditional photographic printing techniques, but with the added flexibility of the digital medium Then you got to play with GIMP’s Clone, Perspective Clone, and Healing tools, allowing you to fix small parts of an image or change an image drastically At the end of this chapter you saw how the Exposure Blend plug-in can be used to get a larger dynamic range in your image by taking advantage of bracketed photos Next up, all of GIMP’s included filters Sweet! 345 Part IV Exploring Filters and Effects IN THIS PART Chapter 13 Implementing Blur, Enhancement, and Distortion Filters Chapter 14 Using Image Creation Filters Chapter 15 Using Compositing Filters Chapter 16 Enhancing Images with Artistic Filters Chapter 17 Working with Specialized Filters Chapter 18 Batch Processing with Automating Filters Chapter 19 Using GIMP Animation Package Chapter 20 Working with Video-Specific Functions in GIMP Implementing Blur, Enhancement, and Distortion Filters T his chapter marks the beginning of an entire section of this book devoted to GIMP’s extensive and impressive list of filters Simply put, a filter is a small program that takes image data as input, performs one or more processing steps on that image data, and returns a modified version to you The filter may require additional input from you in the form of settings and parameters to help customize and control those processing steps In the case of most GIMP filters, the active layer (or your current selected pixels in that layer) serves as the image data that’s fed to the filter This chapter covers some of the most commonly used filters in image editing The Blur filters are designed to obscure details, but in using them you can focus the viewer’s attention on more important parts of your images In GIMP’s array of Enhance filters, you’re given tools that allow you to accentuate specific details or all details in your images The filters in the Distorts submenu can take your image data and dramatically transform it into something that only hints at what your original image was It’s really quite exciting 349 IN THIS CHAPTER Introducing GIMP’s filters Increasing depth and focus by – ironically – using blur Using automated ways of cleaning up images Deforming your images and actually making them look better Part IV: Exploring Filters and Effects Filters Anonymous: A Serious Note on Filter Abuse W ith this chapter and the seven others that belong in Part IV, you get to explore the incredible world of GIMP filters A word of warning, especially if you’re new to computer graphics: filters are incredibly powerful tools that can produce some seriously cool effects on your images Why is this a cause for warning? Well, just because you can something, that doesn’t mean it’s always a good idea It’s a common thing that you see among people who are just starting out with digital imagery They have hard drives just chock full of over-processed images where they’ve taken a perfectly passable photograph that may need just a little bit of work and run nearly every one of the available filters and plug-ins at their disposal The final result may look cool or interesting because of how drastically different it is from its original state, but that doesn’t necessarily mean that it’s a good image Now, that’s not to say that there isn’t a time and a place for heavy processing every now and again I’m sure on some occasions even using a lens flare makes sense and doesn’t look too cheesy But it’s really worth it to sit down and try to understand what an image needs rather than what’s going to make it look ‘‘cool.’’ Furthermore, anybody can go to the Filters menu and create one of these special effects with the click of a few buttons It’s a ‘‘canned effect’’ and by itself, it usually lacks the punch that you’d want to give an image A good digital artist knows how to make the most of a filter by using it minimally where it’s needed and combining that with skillful use of more manual tools to get a powerful and unique final image Filters are a little bit like alcohol When used with moderation, they can be a lot of fun and a lot to enhance the look of your images However, when used in excess, there’s a good chance that you’re going to puke all over your image and make it a muddy mess Use filters responsibly Common Features among Filters Most of the filters in GIMP share some common features The most obvious of these features is the fact that they’re all accessible from the Filters menu in the image window, shown in Figure 13-1 In this menu, the first four items are incredibly useful: Repeat Last (Ctrl+F) — Click this menu item to launch the last filter you ran, using all of the same settings from the last time you used it Using this function’s keyboard shortcut, you can quickly apply the same filter to multiple selections, layers, or even images An important thing to note about this feature is that it remembers only the last filter you used in your current GIMP session If you close and restart GIMP, this item is grayed out and inaccessible Re-show Last (Shift+Ctrl+F) — This option works just like the Repeat Last feature, but instead of blindly reusing the same filter settings, it shows you that filter’s dialog — if it has one — and allows you to make changes before re-running it This is a great feature when you’re trying various settings on a filter on a particular image You can preview the changes it makes within the filter’s Preview pane You can run the filter, Undo (Ctrl+Z) the processed effect(s) if you don’t like the results, and then re-show that filter’s dialog (Shift+Ctrl+F) to try out new settings Some filter effects not have a Preview pane, so the effect is previewed within the image window You can view the effect, Undo (Ctrl+Z) and then try something new (Shift+Ctrl+F) 350 Chapter 13: Implementing Blur, Enhancement, and Distortion Filters Recently Used — The submenu that this option reveals shows a list of all the filters and plug-ins you’ve used in your current GIMP session Click any one of them and that filter’s dialog window appears with its last-used settings This menu item and its associated submenu appears only if you’ve run plug-ins or filters in this session Otherwise it’s hidden Reset All Filters — Typically when you re-show a filter, whether by using the Re-show Last feature or just by choosing it from its window a second time, that filter is shown with its last-used settings In most cases, this is the desired behavior and it’s great for keeping a speedy workflow However, on occasion, it’s more useful to start fresh with a filter using its default values This is especially true on some of the more complex filters Click this menu item to return all filters in your GIMP session to their default values Note The Repeat Last, Re-show Last, and Recently Used menu items actually work on more than just the operations that are accessible from the Filters menu Any installed plug-in that registers within GIMP can be called from these functions For example, the Autocrop Layer feature found in Layer Autocrop Layer is actually implemented as a plug-in When you run it, it’s added to the Recently Used submenu and is repeatable using the Repeat Last and Re-show Last functions This is convenient if you want to autocrop a lot of layers without navigating through the menu because you can just use the Ctrl+F shortcut However, it can be disorienting to see operations that aren’t really filters listed at the top of the Filters menu Fortunately, now you know why that happens and it should be less troublesome for you FIGURE 13-1 All of GIMP’s bundled filters and many of the plug-ins you can download are included in the Filters menu of the image window 351 Chapter 14: Using Image Creation Filters Drop Shadow) is your tool Figure 14-14 shows the Drop Shadow dialog where you can apply the Drop Shadow filter This filter adds a drop shadow to the current selection or to the image if there’s no active selection You can adjust the color (by clicking the color bar), position (with X and Y), and size (Blur Radius) of the shadow and apply it to your image or current selection You can use the Layers dialog to create a layer, or the script will it for you The right side of Figure 14-14 shows the creation of a layer (or a few of them) to help create the desired effect FIGURE 14-14 From the drop Shadow dialog (left) you can apply border effects to your picture In the Layers dialog (right), Drop Shadow effects directly relate to active layer Select what is viewable and what is not to check multiple layers of effects, as well as adjust opacity Once you click OK, your final images have new borders, as shown in Figure 14-15 FIGURE 14-15 The new borders 403 Part IV: Exploring Filters and Effects Perspective The Perspective filter (Filters Light and Shadow Perspective) is used to adjust lighting so that your picture has a new point of view It does this by adding a perspective shadow to the alpha channel and can be seen in the Layers dialog It can help to change the aspect of the image, giving it a different frame of reference and making your selection or layer appear to be standing on a floor that’s perpendicular to the image view You can adjust the color, length, and direction of the background layer, which you can see in Figure 14-16 FIGURE 14-16 Viewing both layers created by Perspective This can be used to give your image a perspective shadow Xach-Effect If you need a drop shadow on your image, this is a great script that basically gives you the ability to apply perspective with a color gradient The Xach-Effect filter is found by going to (Filters Light and Shadow Xach-Effect) 404 Chapter 14: Using Image Creation Filters Using this filter is simple You can apply a drop shadow and adjust the blur radius for different three-dimensional effects, or control highlights of the effect You can adjust the offset with X and Y coordinates as well The effect may not appear at first if you select similar colors for the drop shadow, so consider using lighter colors to add lighter shadows Lens Effect To render your image in a way to mimic a spherical camera lens, use the Lens Effect filter (Filters Light and Shadow Lens Effect) Figure 14-17 shows the Lens Effect dialog box where you can adjust the surroundings and lens refraction index Although this is a very simple-to-use tool, it applies a powerful effect FIGURE 14-17 Using the Lens Effect filter to distort your image You can adjust the active layer by making it transparent The two radio buttons for surroundings allow you to adjust how the lens affects the image inside the lens, as well as outside You can use the preview pane to see how the Lens Effect filter makes your final image distort and bend Find a good setting and click OK Glass Tile If your image needs to be tiled, the Glass Tile filter (Filters Light and Shadow Glass Tile) is extremely helpful It’s simple to use and does what it says If you can imagine looking through a shower door, or other type of glass tile, you can apply that same effect to your digital images Figure 14-18 shows the application of tiling on a rock surface to make it appear like glass 405 Part IV: Exploring Filters and Effects FIGURE 14-18 You can use the Glass Tile filter to apply the glass tiling effect on just about any surface This filter works on your entire image, or within a selection of it through the active layer You can use the preview pane to zoom in on particular sections of your image to see how the tiling will work with it Noise Filters In Chapter 13 you learned how to add blur to your work Now, if you need to add noise to your active layer, you can use GIMP’s deep noise-based filter set It includes Scatter HSV, Hurl, Random Pick, RGB Noise, Slur, and Spread These plug-ins offer many different graining effects that can enhance your work and make it look porous The filter adds defects to the image and makes it imperfect by modifying different elements of your color model and distorting them Noise filters are great for breaking up solid colors to give a more natural or dirty feeling Noise filters can be combined with motion blur or wind filters to generate a brushed aluminum look Basically, their best use is for generating random grit on an image Used creatively, these filters can be used to everything from generate fog to work as the base for pores in a skin texture to apply to a 3D model Noise filters are also great for generating bump maps Scatter HSV You can use the Scatter HSV filter effect to apply noise to your image It does this by allowing for specific adjustments in your color map You can adjust the hue, saturation, and luminosity 406 Chapter 14: Using Image Creation Filters of your composition or work as shown in Figure 14-19 This filter is located in the image window menu under the Light and Shadow menu Run it by going to Filters Noise HSV Noise Figure 14-19 shows how a glossy map surface can be turned into a porous-looking surface when applying a large saturation number with the adjustment slider FIGURE 14-19 Pixels can be adjusted with different settings based on hue, saturation, holdness, and value (luminosity) levels Hurl When you need to apply random noise effects to your image, use Hurl (Filters Noise Hurl) The Hurl filter allows you to apply noise to random sections of your image and adjust seed randomization, randomization percentages, and repeat ratio Random Pick Just like Hurl, Pick can be used to apply random noise to your image The Pick filter within GIMP takes each pixel in your graphic and replaces them randomly by taking a baseline sample from itself and with its eight neighbor pixels The percentage of affected pixels is determined by the Randomization (%) input or slider option This filter is located in the image window menu under the Noise menu Run it by going to Filters Noise Pick Figure 14-20 shows the Pick filter in use 407 Part IV: Exploring Filters and Effects FIGURE 14-20 Using the Pick filter to create noise elements within your image RGB Noise When looking to apply noise to your image and find and use the noise that is most natural looking on an RGB image, you should select RGB Noise In contrast, you can use the HSV Noise filter, which works on a different color model Both produce subtle results The RGB Noise (Filters Noise RGB Noise) filter works by applying more of the effect in some areas of the image and less in others to give the noise value a more natural look and feel You can apply it to a layer or a selection Figure 14-21 shows the RGB Noise filter dialog box where you can adjust your effect settings You can configure correlated noise by selecting the associated check box option This option allows channel values to determine where the noise effect will be distributed Independent RGB allows you to adjust the red, green, and blue values for the image The RGB Noise filter does not work with indexed images Note When discussing digital images, it is important to remember that the main property of an image is its mode The three possible modes are RGB, grayscale, and indexed When working with an indexed image, only 408 Chapter 14: Using Image Creation Filters a limited set of 256 colors or less are used to make up the image’s color map Images of this type were used primarily when system hardware had not caught up to the software’s technology Now that systems are relatively faster, these files are not used often and GIMP’s filter sets not work well with them It’s recommended that you make an RGB file out of your image and then convert it to an indexed image if you need to or for compatibility FIGURE 14-21 Using the RGB Noise filter to enhance a background, or distort an image with random values Slur When you need a noise filter that produces a slurring motion, you should use GIMP’s Slur filter (Filters Noise Slur) This filter samples the pixels in your image and then pushes the pixel color in a downward motion to slur the view You can use the Randomization (%) option to adjust the affected pixels Figure 14-22 shows how a glowing light at night can be converted to a blurry distortion, making it appear as it is were neon Spread You can use the Spread filter (Filters Noise Spread) to swap each pixel in the active layer or selection with other randomly chosen pixels Figure 14-23 shows how to use Spread to move your pixels 409 Part IV: Exploring Filters and Effects FIGURE 14-22 The Slur filter lets you randomize pixels on your image FIGURE 14-23 Using the Spread filter to move pixels vertically and horizontally 410 Chapter 14: Using Image Creation Filters You can use this filter to adjust color transitions Similar to Slur, its main difference is that it disperses the pixels that are present, whereas slur copies the color and reapplies it downward This filter does not introduce any new coloring effects Render Filters When considering GIMP’s toolset for image creation, no better toolset is found than within the Filters menu Here, you can work with Render filters to create some crazy-looking images — some psychedelic, some distorted, but all purely mathematical as you will soon see Because most of GIMP’s tools covered earlier in the chapter affect the underlying image, this section focuses solely on how specific filters are used to create new images Most of the filters in this submenu completely cover the active layer that you apply them to The exception to this is the Gfig filter, which allows you to draw directly on the image In general, though, if you want to use filters from this submenu, it’s a good idea to apply them to a new empty layer Clouds When you open up the Render filters, the first menu item you will find is Clouds Within it you find other cloud-like effects you can add to your image, or use to create a new image completely Difference Clouds The Difference Clouds filter (Filters Render Clouds Difference Clouds) is used to adjust the lighting of the image and apply solid noise to create a pattern on the image Figure 14-24 shows the Solid Noise filter effect dialog box where X and Y adjustments can be made, as well as options to make Turbulent and Tileable selections FIGURE 14-24 The Difference Cloud filter creates a ‘‘fog’’ around your image that gives the appearance of a low-flying cloud 411 Part IV: Exploring Filters and Effects Note This filter provides the same effect as creating a layer of clouds with the Solid Noise filter and then setting that layer’s blend mode to Difference When working with the image, you can alternate the placement of the effect using the Random Seed function By applying a new seed you can set different placement values for your cloud effect Plasma You can use the Plasma rendering effect to saturate your image with color You can also download an enhanced version of the Plasma plug-in from the GIMP Plug-in Registry (Plasma2) found at http://registry.gimp.org, which offers a deeper option toolset to work with This filter is located in the image window menu under the Render menu Run it by going to Filters Render Clouds Plasma Use adjustments such as Random Seed and Turbulence to alter the appearance of the Plasma effect until you have a pattern you are happy with, then click OK to apply the effect A brand-new image appears with your Plasma filter settings applied Solid Noise Like the other cloud effects, Solid Noise (Filters Render Clouds Solid Noise) is useful for creating a new distorted image Solid Noise can be used to create background images that need a textured look and feel Figure 14-25 shows how plasma-like effects can be manipulated to create a solid image in the image window, and to simulate fog like the Difference Clouds filter FIGURE 14-25 Using Solid Noise to create a Plasma-like effect (left) or a Difference Clouds-like effect (right) You can adjust the detail, X and Y components, or add turbulence to your effect 412 Chapter 14: Using Image Creation Filters Nature Nature effects let you create images that relate to the environment For example, flame relates to fire and how a fire burns and peaks, and so does the Flame filter plug-in effect Flame You can use natural effects to enhance your image For example, if you had a picture of a fireplace and wanted to enhance the center of it with more detail in the flames emitting from it, you could apply the Flame filter This filter is located in the image window menu under the Render menu Run it by going to Filters Render Nature Flame Figure 14-26 shows how the Flame filter can be used to create a new flame effect in the preview pane of the Flame filter dialog box This will then be applied to your image FIGURE 14-26 Creating, loading, or editing a new flame filter item in the Flame filter dialog box Warning GIMP users should be warned that issues are posted on GIMP’s web site (http://registry.gimp.org) regarding using this filter with large images Shortcuts and workarounds are also posted on there if more problematic behavior takes place You can save your creations and then load them when needed If you use the Edit button, you can open an editor that allows you to further refine the flame image You have multiple preset themes to choose from for different pattern types 413 Part IV: Exploring Filters and Effects IFS Fractal When seeking more nature-like filters, consider applying the Iterated Function System (IFS) Compose filter (Filters Render Nature IFS Fractal) to your image This tool creates nature shapes such as flowers, leaves, and tree branches It works by making small changes to your image to apply this effect with finesse Figure 14-27 shows the IFS Fractal filter dialog box where you can make adjustments to your image FIGURE 14-27 Using the IFS Fractal editor to create natural-looking designs within your image The main interface is a little dense and takes some getting used to, but it’s full of useful presets and tools For example, you can adjust coloring, as well as spatial aspects of the graphic effect When you find an interesting pattern, click OK to apply the effect Pattern The Pattern effects in the Render filter menu are useful when you want to create new images from a blank background or a pre-existing image file For example, you can use the 414 Chapter 14: Using Image Creation Filters CML Explorer (covered next) to apply texture to a graphic to adjust coloring aspects such as hue CML Explorer The Coupled-Map-Lattice (CML) filter is used to apply a mathematical equation (Cellular Automata) to your image to produce a complex (and colorful) pattern This filter is located in the image window menu under the Render menu Run it by going to Filters Render Pattern CML Explorer Figure 14-28 shows the CML Explorer filter dialog box where you can make adjustments to your image FIGURE 14-28 Using the CML Explorer to make color and pattern changes to your image, or to create a new image entirely from scratch Checkerboard You can use the Checkerboard filter to create a checkerboard effect on your image, or create a new layer with only the Checkerboard on it as a background or to manipulate into a pre-existing image The Checkerboard filter (Filters Render Pattern Checkerboard) is used to create this pattern on the current layer of your image Figure 14-29 shows the Checkerboard filter dialog box where you can make adjustments to your image 415 Part IV: Exploring Filters and Effects You can try the Psychobilly option for a different look This option gives an eiderdown look to the checkerboard and you select it by placing a check in the check box Click OK to apply the effect, viewable in the image window FIGURE 14-29 Using the Checkerboard filter Diffraction Patterns When you need a filter that can create wave-like interference, or diffracted textures, use the Diffraction Patterns filter (Filters Render Pattern Diffraction Patterns) This effect can be used to change frequency, contours, and sharp edges of images you load or want to create Figure 14-30 shows the Diffraction Patterns filter dialog box where you can make adjustments to your image You can use this filter to create psychedelic backgrounds as well as very colorful distortions Grid The Grid filter can be used to apply a grid feature to the top layer so you can adjust it to make many different types of enhancements to your work This filter is located in the image window menu under the Render menu Run it by going to Filters Render Pattern Grid Figure 14-31 shows the Grid filter dialog box where you can make adjustments to your image You have three separate options for controlling the horizontal and vertical grid lines and intersections The chain icon locks the horizontal and vertical settings together This is done so that any changes applied to one option are reflected in the other option Click the chain icon to unchain them and work with them independently if needed 416 Chapter 14: Using Image Creation Filters FIGURE 14-30 Using the Diffraction Patterns filter to apply psychedelic-looking imagery to your graphic FIGURE 14-31 Using Grid to apply a grid to your image Once you set your colors of the grid lines and intersection marks you can apply the filter, as shown in Figure 14-32 417 ... your exposure images FIGURE 12-17 The Reset Blend Details dialog allows you to adjust tone mapping settings without reselecting your exposure images 343 Part III: Manipulating Images Because... other is run-length encoding (RLE) IIR can be used for scanned images and photographic images RLE can be used for computer generated images Enhance Filters Enhance filters are used to compensate... on more important parts of your images In GIMP’s array of Enhance filters, you’re given tools that allow you to accentuate specific details or all details in your images The filters in the Distorts