Editing Those Raster Images1 Jan, 1999 By: Lynn Allen
Last month we discussed the wonderful world of RASTER and the new Release 14 Image Manager. By now many of you have been inserting raster images to your heart's content and have found yourselves wondering how to edit those images after you've inserted them. This month we'll address that very question (it's your lucky day!).
It's common practice to mix raster images with vectors in an AutoCAD drawing. Heretofore, this procedure didn't always yield desirable results. With the new R14 Image Manager, it's easy to attach, load, unload and so on any supported raster image. The Image Manager can be found in the Insert pulldown menu under Raster Image... . For an in-depth explanation on the Image Manager, see last month's column ("The World of Raster," December 1998).
Modifying Your Image
Five different commands affect your raster images in the Modify pulldown menu. Select Modify =>Object=>Image and you'll find four of these five commands: Adjust, Quality, Transparency and Frame. Let's peruse these commands one at a time.
Figure 1. The IMAGEADJUST dialog box lets you modify Brightness and Contrast, as well as how much the image will fade into the background.
This option executes the IMAGEADJUST command. After selecting the raster image you want to adjust, the dialog box shown in Figure 1 displays on the screen (I'm on the right!).
Use this dialog much like you would the adjust options on your television set (that doesn't mean kicking it!). Using the three controls of Brightness, Contrast and Fade, you should be able to get the final picture you desire. Each property can have a value set between 0 and 100. As you adjust the values, you see the changes to the preview image update immediately within the dialog box; any modifications you make to the image in your drawing do not affect the original image file. (Note: Images that are Bitonal cannot be adjusted for brightness, contrast or fade; a Bitonal image consists of only a foreground and a background color. )
Brightness works hand in hand with Contrast. The higher the value, the brighter the image will become. You'll typically use Brightness to darken or lighten an image. You'll also find that the higher the setting, the more pixels will become white as you increase the Contrast setting.
Contrast controls the contrast of colors within the image. You might be able to use Contrast to make poor quality images easier to read. The higher the setting, the more you'll find that each pixel is forced to take on its primary or secondary color.
Fade controls how much the image fades into the background color. A setting of 100 will completely fade the image into the background. Should you change the screen background color-you'll find the image automatically adapts to the new color. When plotting, AutoCAD uses white as the fading color. Some users use Fade to create a watermark effect on a drawing or to make it easier to see vectors over raster images. Hitting the Reset button returns the values to the standard default of 50 for Brightness, 50 for Contrast and 0 for Fade. You can also access command-line-driven prompts of IMAGE
ADJUST by putting a dash in front of the command (-IMAGEADJUST).
The next command on our list is the IMAGEQUALITY command. This command can be used to speed up or slow down your drawing performance. High quality raster images take longer to display than those of draft quality. Note the command prompts for the IMAGEQUALITY command:
Command line: imagequality
High / Draft / <current> :
Setting the quality to Draft improves performance, and you'll notice the effect takes place immediately (without a dreaded regeneration). AutoCAD always plots using high quality so you don't need to worry about setting it back before plotting.
The Third Command we'll discuss controls the transparency of your Raster images. It comes in handy should you want other objects to display through the raster image or through those pixels that are set to transparent. Not all images support this capability. Transparency can be used on Bitonal and Alpha RGB or grayscale images; it is specified by object, and images are inserted with transparency set to off by default.
In order to select an image for modification or clipping, the image frame must be ON (which brings us to the FRAME command). Selecting FRAME from the Modify =>Object =>Image pulldown menu executes the IMAGEFRAME command. You'll find that IMAGEFRAME is set to On by default and that this setting affects all raster images. Should you turn the frames off, the boundary edges will no longer be visible and your raster images will no longer be selectable.
Figure 2. The Modify Image dialog box lets you modify image properties, parameters and display properties.
Show Clipped Image displays the clipped image when checked, the full image when not checked. Transparency is self-explanatory. You can only control the above settings on one image at a time via the DDMODIFY command.
The coolest of all the new image commands is IMAGECLIP. Previous to R14 we could only view entire image files. Now we have the power to clip and keep only the portion of the raster image we desire. This clipping can be reversed or modified at any time, so there's no fear of incorrect clipping. IMAGECLIP is located in the Modify pulldown menu under Objects. Let's review the options.
Select image to clip: pick the desired raster image
The default option of New boundary is used to determine the clipping boundary. Accepting the default gives you this prompt:
Rectangular prompts you for the two corners of a rectangle to be used to clip your raster image. Picking a point at the above prompt also assumes rectangular and only prompts you for the second corner. You'll also find that the rectangle is always drawn parallel to the edges of the image frame. Polygonal gives you more control as you can select many straight-line segments. These segments are not allowed to cross each other, or leave the image area. You'll find an Undo option available should you pick an incorrect point as well as a Close option. Surprise, surprise-you must have at least three points to define a polygonal area.
You can only have one clipping area per image. If you try to create a second clipping edge, you will be asked if you want to discard the first clipping area. Answering with a No will terminate the command.
Jumping back to the original options in the IMAGECLIP command of:
ON turns clipping ON and displays the clipped image (using the previously defined clipping frame).
OFF turns clipping OFF and the entire raster image displays. Should you create another clipping boundary, clipping will automatically be turned back ON.
Delete is used to remove a previously defined clipping boundary, the full image again displays.
These are all of the standard IMAGE modification commands, but I would be remiss if I didn't mention the awesome BONUS tool that takes clipping one step further-CLIPIT. Located under the Bonus =>Modify pulldown menu you'll find the Extended Clip option. Hopefully, you've all loaded the incredible BONUS menus (I can't live without mine!).
CLIPIT goes one giant step further than IMAGECLIP by allowing you to clip to a polyline, a circle or an arc. You will draw the clipping frame first with any of the above objects and then execute the CLIPIT command. Let's review the CLIPIT options:
Pick a POLYLINE, CIRCLE or ARC for clipping edge...
Select objects: Pick the object(s) you want to use for your clipping edge.
Pick an IMAGE, a WIPEOUT or an XREF/BLOCK to clip: Pick object to clip.
Enter max error distance for resolution of arcs <0.0200>:
The last option might confuse you. CLIPIT actually allows you to clip to curved boundaries by creating a series of very short line segments along the arc. You control the precision of these line segments relative to the arc segments within your curve. You specify the maximum distance permitted between the midpoint of any given segment and the corresponding arc. The smaller the value, the tighter the boundary will follow the curve. The end result looks great, you'll never know it's not actually clipping to the physical curve. The CLIPIT help file does an excellent job of explaining the process for traversing arc segments.
CLIPIT doesn't stop at raster images. You'll find that you can also clip your wipeouts, external references and blocks in the same manner. For those of you who are on the VIP subscription plan or have purchased the Express tools, you'll find that CLIPIT has been enhanced to permit clipping to ellipses, text, mtext and attribute definitions (if you can imagine!).
Introducing raster files into a vector environment is an amazing accomplishment. What used to be painful at best is now a simple process. If you've shied away from using raster images in your drawings due to past experiences, hopefully you'll give them another chance. I think you'll find them much easier to use and modify.
Until next month...Happy AutoCADding!
Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
POV Dispatch: Storytelling: Our Secret Weapon in an Age of Complexity 9 Dec, 2013
Do Model-Based Initiatives Require Process Change? 9 Dec, 2013
Revit 2014 Update Release 1 Now Available For Download - Crash Reductions or Enhancements? 19 Jul, 2013
How to Replace the Viewport Compass with your Company Logo 5 Jul, 2013