Home > ZWCAD > Hatches and Realistic Images >
Attach, Scale, and Detach Raster Images

May 20, 2011

     Raster images consist of a rectangular grid of small squares or dots known as pixels.

      As consists of multiple rectangular grids, raster images can be copied, moved, or clipped as well as an normal object in the drawing. You can change the position and size of the image by dragging its grips. You can also adjust the contrast, transparency, image quality and image frame visibility as well from the menu option "Modify-Object-Image".

       Image file formats ZWCAD supports most of the frequently used file formats, such as computer graphics, document management, engineering, mapping, and geographic information systems (GIS) and image file of bitonal, 8-bit gray, 8-bit color, or 24-bit color.

      Once you have inserted an image with transparent pixel, the drawing behind the transparent pixel will be displayed when you turn on the image transparency. If you insert a bitonal image, the background color pixel is processed by transparency, either gray or color images is assigned to support transparent pixels.

      Additionally, when inserting raster images, the file format depend on the content of the file rather than the extension name. The following table display all the image file formats supported by ZWCAD:


Type: Description and versions: File extension:
BMP Windows and OS/2 bitmap format .bmp
JFIF or JPEG Joint Photographics Expert Group .jpg or .jpeg
PCX Picture PC Paintbrush Picture .pcx
PNG Portable Network Graphic .png
TARGA True Vision Raster-Based Data Format .tga
TIFF Tagged Image File Format .tif or .tiff
GIF Graphic Interchange Format .gif

Attach Raster Images

       Use IMAGEATTACH to select and attach raster images, or bitonal, 8-bit gray, 8-bit color, or 24-bit color image files to a drawing. Attaching an image creates an image definition, loads the image into memory, and displays the image. Similar to the attach xrefs, attching a path of the raster image that is not virtual part of the drawing file, the path linked to the image files can be changed or removed any time you want. The image file can be inserted as blocks as many times as you like once attached to the current drawing, you can clip the attached raster image and setup its lightness, contrast, fading and transparency.

To attach a raster image

  1. Choose Insert > Raster Image.

  2. Specify a file to attach, and then click OK.

  3. In the Image dialog box, in the Inserttion point and scale ,click Specify on screen. Specify rotation, and then click OK.

  4. Specify an insertion point.

  5. Specify a scale.

Reference toolbar\

Command line IMAGEATTACH

Positioning File

      Tfw file is a .txt about TIFF image coordinates information, this file defines the affine relation between image pixel coordinates and actual geographical coordinates, its basic theory are shown as follows:



in which :

x'=geographical X coordinate corresponding to pixel

y'=geographical Y coordinate corresponding to pixel

x=pixel coordinate 【Colume number】

y=pixel coordinate 【Line number】

A=Pixel resolution at X direction

D, B=rotation system

E=Pixel resolution at Y direction

C=X coordinate of pixel center at left upper corner of grid map

F=Y coordinate of pixel center at left upper corner of grid map

Click Using Positioning file option, you can specify insertion point of tif iamge and its scale using twf file.

Find button is available as soon as you check the "Using Positioning file" option, and click on this button, you can select proper TFW file.

Scale Raster Images

      To attach a raster image to current drawing, you can specify scale factor in the Image dialog box, otherwise to attach it by its original size. The raster image will be scaled by the specified factor, the scale factor is used without unit by default.

     If the attached image contains resolution information for defining DPI, the specified scale factor will be united with measure to scale attached raster image. If resolution information is not included, then the original width of the image will be taken as unit for the scale factor when attaching the image.

Detach Raster Images

     Raster images can be detached if it no longer needs to use in the drawing, a specified image detached from the drawing together with its multiple copies, links and definitions, but the original image file will not be influenced.

     Unlike detaching an image file, removing the image directly from the drawing retains the image in Image manager. Only can detaching the image remove the links of the image that connecting the drawing.

Commands Reference

IMAGE: Manages images

IMAGEATTACH: Attaches a new image to the current drawing

System Variables Reference


PrintPrint Get a PDF version of this webpage PDF

© 2017 ZWCAD Software Co., Ltd. All rights reserved. Privacy Policy. Terms and Conditions