Print

File Formats of Images Inserted into GoldSim

Jason -

Embedded images help to enhance the visual presentation and graphical illustration within GoldSim models. Since image data is stored along with the model file, it is important to choose images that don't cause your file size to grow unnecessarily. Images are usually added to GoldSim models for the following purposes:

  • Display company logos
  • Add background maps, schematics and aerial photo images to illustrate the model structure
  • Enhance dashboards graphically
  • Customize GoldSim element icons (i.e. change the container appearance)


GoldSim supports multiple image file formats to be inserted into the graphics pane and uses its own compression algorithm for storing raster image information while not being rendered. For best results, images inserted into GoldSim should be vector images saved as enhanced metafile (EMF) file types. Obviously, some images such as aerial photos simply must be saved as raster images but images with geometric lines and solid colors (e.g. company logos, schematic diagrams) usually can be drawn as vectors. This document serves as a guide to help you efficiently convert and insert EMF graphics into GoldSim. Before diving into the details of how to insert images, it is important that you understand the basics of computer graphic file types and the difference between vector and raster images. Once this is understood, you will be able to make better graphical design decisions for your modeling needs.
 

Raster vs. Vector Graphics

There are two classes of computer graphics: Raster and Vector. Raster graphics (also called bitmaps) are composed of a grid of individually colored and shaded pixels. An aerial photographic image is rendered as a raster graphic. Raster type graphics typically require much more memory to store and render than vector graphics do. Vector graphics are composed of interconnected paths defined by math relationships. An AutoCAD drawing is produced using a 3D vector graphics engine. Below are two images showing the comparison of raster verses vector graphics. 

         Raster Image                                  Vector Drawing

Image

The letter “A” on the left shows the anti-aliasing of pixels near the edges to remove the jagged appearance of the raster image. The letter “A” on the right is a scalable vector drawing that will always remain smooth (when rendered by a vector display engine). Raster image file sizes are usually much larger than the file size of similar images that are rendered as a vector graphic. For this reason, raster image files are often compressed when the data is being stored. The compressed raster will be temporarily uncompressed in order to be rendered on the screen.

Typically, you may not even notice a difference between raster images and vector drawings inserted in GoldSim. Below, is a screen capture of both that were inserted as a raster image on the left and a vector drawing on the right, zoomed at 100% in GoldSim.

As you can see, these both look very similar. But when you scale the images or zoom in, you will start to see the pixels of the raster image, depending on the resolution the raster image was saved at. Below, is the same model at 200% zoom.As can be seen, the raster will eventually reveal pixels at a larger scale while the vector will hold it's same form at all scales. 

 

Importing Images into GoldSim

There are two ways to insert images into GoldSim:

  • Paste from the clipboard
  • Click on the "Insert Image" button in the Drawing Tools toolbar or select Insert, Images... from the Graphics main menu

 

Pasting Images from the Clipboard

In order to paste images from the clipboard, you obviously need to first copy the image to the clipboard. When data is added to the clipboard by an application in Windows, it typically makes it available in as many different data formats as it can. This includes both native and simpler (or more common) formats that would have a higher chance of being recognized by a wide variety of applications. Not all programs make the same data formats available. When the paste command is issued in GoldSim, GoldSim searches for the most suitable image type, starting with EMF and then working its way down the list.  When an image is copied to the clipboard from Microsoft Paint or a Microsoft Office program and then pasted into GoldSim, GoldSim always pastes an uncompressed image type (i.e. EMF). If the pasted image originated from a compressed file (i.e. JPG), the GoldSim file size will grow according to the size difference of the uncompressed image file when it is pasted in. If you copy an image from a program that does not provide EMF images on the clipboard, there is a chance the image will not scale well. 

Copy a Vector Drawing (EMF) to Clipboard

Here are the steps to copy a vector drawing to your clipboard. Note that Adobe Illustrator . When you make the selection and you see individual components selected as shown below, then you know it is a vector drawing. You can also ask your graphic designer to make sure before continuing.

  1. From within Adobe Illustrator, InkScape, or CorelDraw, select the contents that you want to copy to the clipboard. 
  • Here is the GoldSim Logo vector drawing as seen in Adobe Illustrator with the logo selected and ready to copy to the clipboard.
  • Here is the logo saved in InkScape as an SVG vector drawing with the contents selected and ready to be copied to the clipboard.
  1. Paste the clipboard contents into a PowerPoint slide. 
  2. Right-click on the image and select Group then Ungroup. Note: If you don't see the "Group" command, it means your pasted image is not a vector drawing and you will need to go find the original vector drawing and start over.
  3. You will be asked to confirm if you want to convert the image to a Microsoft Office drawing object. Click "Yes".
  4. Now the image can be copied and pasted into GoldSim as a vector drawing. The drawing will be scalable and have transparent background.

Save a Vector Drawing for Importing into GoldSim

Here are the steps to copy and paste a vector drawing into GoldSim. Note that your drawing must be a vector graphic for these steps to work properly. When you make the selection and you see individual components selected as shown below, then you know it is a vector drawing. You can also ask your graphic designer to make sure before continuing.

  1. From within Adobe Illustrator, InkScape, or CorelDraw, select the contents that you want to copy to the clipboard. 
  • Here is the GoldSim Logo vector drawing as seen in Adobe Illustrator with the logo selected and ready to copy to the clipboard.
  • Here is the logo saved in InkScape as an SVG vector drawing with the contents selected and ready to be copied to the clipboard.
  1. Paste the clipboard contents into a PowerPoint slide. 
  2. Right-click on the image and select Group then Ungroup. Note: If you don't see the "Group" command, it means your pasted image is not a vector drawing and you will need to go find the original vector drawing and start over.
  3. You will be asked to confirm if you want to convert the image to a Microsoft Office drawing object. Click "Yes".
  4. Now the image can be copied and pasted into GoldSim as a vector drawing. The drawing will be scalable and have transparent background.

Insert | Image Feature

GoldSim allows the following types of images to be imported using the Insert | Image command:

  • Vector: EMF and WMF
  • Raster: BMP, PNG, GIF, and JPG

 

To insert an image into GoldSim, click on the Graphics menu at the top of the screen and select Insert | Image…
Image

Alternatively, you can click on the image insert button, usually located on the right side bar of GoldSim:

Image

The Insert Image command will invoke an image rendering engine if the file being inserted is not of EMF or WMF type. If you insert a raster image (BMP, PNG, GIF, and JPG), the GoldSim image rendering engine will invoke compression and decompression on the image each time your model is saved and re-opened or each time the image is copied and pasted inside GoldSim. This repetitive cycle of rendering and storing the image will likely cause image degradation. If the file you insert is EMF or WMF, this image render engine will not be used and no compression will be done, thus saving your file from any scaling issues. Note that the only way to insert custom GoldSim element icons is by inserting EMF files. This is done by opening the properties dialogue of the element and clicking “Appearance…”. Select the Image tab and select the “User-defined symbol” option, which will enable the “Select new image…” button and immediately open a browser for your file. Only EMF file types can be selected at this point. 
 

Preventing Image Degradation in pre 11.0 Versions of GoldSim

In versions of GoldSim prior to version 11.0, non-EMF/WMF image files that are inserted into GoldSim are likely to undergo generational degradation after the model file is opened, saved, and closed repeatedly or after the image is copied to many places within the model. There is also a chance the image will not scale well. GoldSim Technology Group is currently aware of this behavior and is working on a more elegant handling of inserted raster images. In the meantime, it is important that you follow the steps outlined in this article to avoid scaling problems and/or degradation of raster images.  You will need to convert your image to an EMF in order to prevent these problems. Vector images (EMF and WMF) will never experience degradation in GoldSim, no matter how they are inserted (paste from clipboard or manual insertion). Use the following instructions to make the conversions. Using the Insert | Image… Feature to Insert Raster Images into GoldSim If you are going to use the Insert | Image… feature to insert your image into GoldSim, you will first need to convert the image to an EMF (or WMF). There are multiple ways of doing this, each of which is outlined below.
 

Using Microsoft Paint to Create an EMF

  1. Copy the image to your clipboard
  2. Open Microsoft Paint (All Programs, Accessories, Paint)
  3. Paste the image into the Paint program
  4. Select all, then copy to the clipboard
  5. Open GoldSim, paste the image from your clipboard

 

Using GoldSim to Create an EMF

  1. Open your raster image file into Microsoft Paint
  2. Copy the raster image to your clipboard
  3. Open GoldSim and paste the image into your model
  4. Left-click on the image so that it is selected
  5. Go to File | Export and select “Graphic Selection…”
  6. Save the file as an EMF file type
  7. In GoldSim, use the Insert | Image… feature to re-load the image into GoldSim

 

Using Power Point to Create an EMF

  1. Open Power Point
  2. Insert an image
  3. Click on the image so that it is selected
  4. Right-click on the image and select “Save as Picture…”
  5. When the “Save as Picture” dialogue window appears, choose Enhanced Windows Metafile (EMF) from the drop list of file types to save as
  6. Save the file
  7. In GoldSim, use the Insert | Image… feature to load the image into GoldSim

 

Using a 3rd Party Software to Create an EMF

  1. Find an imaging software program that supports conversion of raster images to EMF file type. Note that this “conversion” entails embedding a bitmap image inside the EMF. The EMF format supports the combination of vector and raster graphics. CorelDraw and Adobe Illustrator are examples of software that have the EMF conversion capability.
  2. Open (or insert) the raster image into the 3rd party software program
  3. Export the image as EMF (for example, in CorelDraw, Go to File | Export… and select EMF as the “Save as Type” option
  4. In GoldSim, use the Insert | Image… feature to load the image into GoldSim

 

Pasting Raster Images into GoldSim

Follow these steps when pasting raster images into GoldSim without subsequent degradation:

  1. Open one of the following software programs:
    a. Microsoft Paint
    b. Corel Photo
  2. Open/load the raster image file into the program
  3. Select the image and copy it to the clipboard
  4. In GoldSim, paste the image from the clipboard
    Microsoft Office programs can also be used to copy images to clipboard and pasted (as EMFs) into GoldSim, but the image may not paste exactly as it is seen before the paste occurs.

 

Native Vector Images in GoldSim

Vector images are the best type of images to use in GoldSim because of their small file size (even though they are uncompressed), they are natively supported in GoldSim, and they can be scaled easily. Vector images can be created in GoldSim, CorelDRAW, Adobe Illustrator, InkScape (free), or other vector drawing software.  To create a vector drawing in GoldSim, follow these steps:

  1. Open GoldSim
  2. Use any of the drawing tools from the “Drawing Tools” menu to draw shapes (see below)
Image

3. Once you have your image the way you want it, select the entire drawing by drawing a selection box around the entire entity (see below).

Image

4. From the Graphics menu, select Export... or type Ctrl-E and a Save As dialog will appear.

5. When the “Save As” dialogue window appears, choose Enhanced Windows Metafile (EMF) from the drop list of file types to save as

6. Save the file

7. In GoldSim, use the Graphics | Insert | Image… feature to load the image back into GoldSim
 

Vector images created in other software simply need to be converted (exported) to EMF and subsequently inserted into GoldSim using the Insert | Image… feature.

 

Types of Image File Formats

There are many graphic image file formats available today, which will not all be described in this document, but you can look them up here: en.wikipedia.org/wiki/Image_file_formats. Attributes of the some of the most commonly used file formats are summarized in the table below:&
 

File Format Type Attributes
JPG Raster Data lost in compression; uses full color spectrum; good for websites
GIF Raster Lossless compression; limited color spectrum; good for websites
TIFF* Raster Compression that can be lossy; limited color palette; best for printed documents
BMP Raster Uncompressed; varying color palettes available; wide application in Windows programs
PNG Raster Compression that can be lossy; true color spectrum, good or websites
WMF Vector/Raster Can embed bitmap data; no compression
EMF Vector/Raster Successor to WMF; Can also embed bitmap data; no compression
AI* Vector Adobe Illustrator
SVG* Vector XML based, open standard
CDR* Vector CorelDraw
DWG* 3D Vector AutoCAD


*Image format is not supported in GoldSim

Of special note are the file types that may lose data when compressing: JPG, TIFF, and PNG. 

 

Conclusions

Using the methods described in this article, you will be able to improve the efficiency of your graphical enhancements and reduce the overall file size of your model. If you have more questions about inserting images, please contact support@goldsim.com.

Have more questions? Submit a request

Comments