DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Using image files to add labels and other objects to. Saving as image files.

Started by rcacdcad, November 02, 2011, 06:25:43 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Why do image files look worse after working them in dcad 19.1

What resolution should I start with
0 (0%)
How do I improve save resolution
0 (0%)

Total Members Voted: 0

Voting closed: November 09, 2011, 05:25:43 AM

rcacdcad

I have image files of a floor plan that I have to add labels, titles, symbols and pointmarks to. So the image file is the base layer I am working with. I open a new file and load the image. After doing what I have to add objects I save the file not only as a dcad file but also as an image file. It is the altered image file I wish to add to documentation later. That way I don't need DCad to open it. But after saving this image file it opens up as about 1/3 the resolution as before. Numbers of the rooms are barely readable. Is there a type of file and resolution I should start out with? Also I am having trouble with opening .pdf file images in design cad 19.1. It ends up cutting off parts of it and distorting the scale. I have tried .pdf and .jpg image files but it usually ends up the same.


Dr PR

rcacdcad,

Take a deep breath, there is a lot to know about bitmap files and DesignCAD.

A. Bitmap files are created at some dot per inch (dpi) density. They have fixed dimensions in the number of pixels (dots) wide and high. You cannot change this without editing the file in a bitmap editor like Photoshop.

B. DesignCAD files are vector files, so they have no fixed dimensions. You can change the dimensions simply by changing a variable. So there is no constant or predictable relationship between the size of objects in vector files and bitmap pixel density.

Everything that follows is a result of this ambiguity.

Relative Image Size

1. When DesignCAD imports a bitmap image the size of the bitmap relative to existing objects is somewhat arbitrary. The bitmap seems to be scaled relative to how you are zoomed in on the DesignCAD drawing (how much of the total vector drawing is visible at the time the bitmap is imported).

You can verify this for yourself by creating a new file in DesignCAD, then draw two horizontal lines, one spanning the width of the drawing window and another short line in the middle of the window.

Use "View/Fit to window" (CTRL W) to zoom out and then load a bitmap file (File/Image/Load Image File). Now draw a line (V) from the lower left corner to the upper right corner of the bitmap image.

Delete the bitmap.

Zoom in so the short horizontal line fills the width of the screen. Now load the same bitmap image again.

Zoom out again and compare the size of the second bitmap to the diagonal from the first. The second image is much smaller than the first.

2. The moral of this story is that of you want to import two bitmaps at the same pixel density relative to the rest of the drawing you MUST be zoomed to the same level when you import each file.

DesignCAD has no function to allow you to specify a specific zoom level, because zoom is relative to the overall drawing size, and that can change every time you edit the drawing. Again, there is NO absolute relationship between bitmap size and vector file dimensions.

3. If you want to import multiple bitmap images (say parts of a single larger drawing that was saved as multiple images) here is a trick that has always worked for me:

  a. Open a blank file.
  b. Draw a line of any length on layer 1. Lock this layer and never edit it! This is your scale reference for importing bitmaps images.
  c. Make layer 1 visible and hide all other layers.
  d. Use "Zoom to Fit Window" to set a reference zoom level.
  e. Import a bitmap onto the next highest layer.
  f. Repeat steps c through e until all bitmaps have been imported. They will all be at the same relative pixel size.

You can reposition bitmap images by selecting them and dragging just like any other object.

You can always add another bitmap at any time by repeating steps c through e.

Bitmap Scaling

When you zoom in and out over a bitmap DesignCAD has to convert each pixel in the original image into multiple pixels on the screen. These new pixel groups that represent individual pixels in the image are generated relative to the position of the bitmap image (lower left corner I think), and not relative to the positions of the vector objects in the drawing.

The width of vector lines and curves does not change relative to screen size* when you zoom in and out. Therefore, the width of "lines" in the bitmap drawing changes with zooming, and vector line widths do not.

This has significant consequences.

When you zoom in and out the original pixels in the drawing are scaled accordingly. If the scaling happens to be an even value (2X, 1/2X, etc.) the relative positions of the new pixel groups (that are created to represent the actual pixels in the image) will be positioned more or less correctly relative to the vector parts of the drawing.

If the zoom factor is irrational (1/3 for example) it will be impossible to produce a pixel group that is positioned exactly the same as the vector elements in the drawing. Therefore the visible position of the "pixels" in the bitmap change position relative to the vector objects with different zoom levels.

This means that you cannot trace over lines in bitmap drawiings accurately if you zoom in and out. If you do zoom in and out while tracing the vector tracings will not be aligned correctly, the resulting drawing will be inaccurate, and this will drive you nuts.

If you want to trace over a bitmap image you should always work at the same zoom level. You can use the trick described above to establish a zoom reference.

* The "Enable Fixed Lineweight" option in the Info Box will cause vector lilnes to change width when zooming. However, they may still change positions relative to an underlying bitmap.

Image Quality

Now consider the problem you mentioned - crummy image quality when printing bitmaps. There are two causes of this.

The first is the effect of scaling the bitmap image mentioned above. This can add a coarseness to the bitmap image, depending upon how much you are zoomed into the drawing when you print. If you use screen capture, or "File/Image/Save Image File" with the "Current Display" option, the bitmap image will be reproduced not as the original image viewed in an image viewer, but as it is recreated on the DesignCAD screen. This will be a pretty coarse image with lots of jaggies because screen resolutions are extremely poor compared to print resolutions. If you use the "Wireframe" option and zoom out appropriately (whatever that means) you will get better bitmap images in the print. You will have to experiment to find the best zoom scaling. The best images will result when you print the bitmap in DesignCAD at exactly 1:1 dpi in the print. That may be a bit hard to figure out, and it may result in the rest (the vector part) of the drawing being printed at the wrong size. Nobody ever said life would be easy!

The second reason that bitmaps viewed or printed in DesignCAd will not be as "pretty" as when viewed with image viewer programs (Windows Picture and Fax Viewer) is that the image display programs post process the bitmap images to make them look better. The most common trick is "antialiasing" where solid black lines with jaggies are massaged to make the edges "softer" by toning down the points of the jaggies to lighter shades of gray and making the center of the lines darker. The jaggies are still there, but just not as visible. DesignCAD (and other CAD programs) does not do this because it would just make the image fuzzier and harder to trace over.

****

There, in so many words or more, is a lesson about bitmaps and DesignCAD.

Phil
DesignCAD user since 1987

SciGraphics

Dr PR:
  You are truly a Hero Member!! In your discourse on "bitmap scaling" you answered a problem I have been wrestling with for over a decade. Even Mr. Troll couldn't figure out what I was talking about. The problem was: If I import a bitmap to trace over, and it about fills the screen, and then I set the scale by setting the number of units across the picture (say 9-1/2 inches wide) and set the line width (0.01 units) and then draw a box around the picture, aligning it very carefully, and then zoom in to draw some complex area, the box is no longer aligned with the picture but has shifted by some amount. And not always the same amount. My work around is to decide how much zoom to apply for accurate drawing and then make sure I save the drawing/picture at that zoom so when I recall the drawing to work on it, it is recalled at my predetermined zoom setting.
  I'm going to print out your section on "bitmap scaling" and pin it on my wall. Then I'm going to start figuring out how to use your information to solve my problem.

  Thank you. Roger wilco over and out. Jim A., Tucson, AZ

Dr PR

OK, to beat the mule to death, here is more.

Let's say the bitmap you import is 1000 pixels wide. It will look pretty good on the screen in an image viewer program.

Now let's say you import it and print from DesignCAD. You select a normal paper size, letter or A3, with landscape rotation. If your printer prints at 300 dpi your 1000 pixel wide bitmap will print only 3.3 inches wide at its original resolution.

But if you tell the printer driver to "fit to screen" the bitmap will be expanded about 3.2X to fill the paper width. Now every jaggie is over three times as large as in the original image. Ugly!

If you want good bitmap printouts from DesignCAD you must use a bitmap that has enough pixels to fill a page at the desired print size. Edit the bitmap in a bitmap editor to make it large enough to print full page size at the printer's dpi settings before you import it into DesignCAD. Even so, DesignCAD doesn't do the antialiasing image massaging that image virwers use, so it still may not look as good.

More pixels is better, but really large bitmap images can slow DesignCAD to a crawl. You can't get something for nothing (thermodynamics).

Phil
DesignCAD user since 1987

DrollTroll

A very good nutshell overview of bitmap scaling. Thanks Dr Pr, that was exactly what I had tried to explain to Jim in the past, but your wording was far better than mine.
25 years with DesignCAD