CAD plug-in XPs from PK Data Jpeg32 - JPEG and PNG export
PK Data CAD plug-ins

The JPEG XP-module adds export filters for JPEG and PNG bitmap files. With the XP installed you can use "Save As" to save the current drawing in JPEG or PNG format, easy to publish on the web or send to your customer. The included WBS (write bitmap section) command will save part of the drawing as bitmap (a window). The JPEG XP-module also supports large bitmaps.

Download the demo now!

New export filters

The XP will automatically install two new export filters. Both "JPEG File" and "PNG File" will appear at the end of the file format combo box. Both of them are ready to use.

The size of the bitmap and the compression rate is set in the JPEGOPT command. See below for details.

The JPEG XP allows you to save bitmap files larger than the windows bitmap limitation, by concatenating smaller bitmaps to a larger one. This is done automatically so you don't need to worry about it.

What is JPEG?

The JPEG (Joint Photographic Experts Group) format was created to compress images of real-world scenes. It does not work well on non-realistic images such as cartoons and line drawings. This would include most of the work done with a CAD-program.

The JPEG compression is "lossy", meaning that the decompressed image is not identical to the original. The quality factor lets you make trade-offs between image quality and file size.

What is PNG?

PNG stands for Portable Network Graphics and is pronounced "ping". The PNG format was created in 1995 to replace GIF, when Unisys and CompuServe announced that programs implementing GIF would require royalty. The usage of PNG has increased recently due to other royalty issues.

Like GIF, a PNG file is compressed in a lossless fashion. The decompressed image will be identical to the original. The compression rate for PNG is between 10% and 30% better than for GIF. The PNG format is supported by Netscape and Internet Explorer beginning with version 4 (both programs)



WBS - Write bitmap section

The WBS command saves a portion of the drawing as a bitmap. You are asked for a window and a filename. Everything inside the window will be saved to the bitmap. Supported formats are BMP, JPEG and PNG.

Commands:
WBS Write bitmap section.


JPEGOPT - Set output options for the bitmaps
JPEG options dialog

The JPEGOPT controls the settings for the bitmaps.

Bitmap size
If "Use clipboard resolution" is turned on, the resulting bitmap will use the size from CLIPOPT command. The size is read from the registry so the settings from the last session of FastCAD are used. This is the default setting.

If "Use clipboard resolution" is turned off, the size set in this dialog is used.

Unused area
The unused area settings decide what to do when the aspect ratio of the bitmap doesn't match the area of drawing being written.

  • "normal" mode - as much as possible is included in the bitmap.
  • "blank" mode - only the marked area is included in the bitmap, the rest is left blank. This only has effect for write bitmap section (WBS). For save as this is the same as "normal" mode.
  • "crop" mode - The bitmap size is changed to fit the ratio of the area in the drawing.

PNG Compression
You can select which PNG compression algorithm to use. The fast mode will produce significantly larger files than the other two. If you produce large files or have a slow computer you should consider selecting the default mode instead of maximum compression (the default setting).

JPEG
The quality factor should be between 1 and 100. The lower the value is the smaller file, but with lower quality.

The progressive mode produces a bitmap that will show up gradually.

Commands:
JPEGOPT Bitmap options


Automatically added menu

As default a menu is automatically appended. The menu will be placed at the end of the menu bar, just before Help.

If you don't want the menu it can be turned off with the JPEGMENUOFF command. The JPEGMENUON command will turn it back on again. The state is stored in the registry so the menu will not appear again in the next session.

Both the commands require the menu to be reloaded. This is automatically done when you start a new FastCAD session.

Commands:
JPEGMENUOFF Turn off the automatic menu.
JPEGMENUON Turn on the automatic menu.


Limitations in the Jpeg32 demo

The demo version is fully functional, except that the resulting bitmap has two out of three pixel lines painted black. You are able to view the image files, but they look a lot darker than the original.

Download the demo now!




Please read the license information!




The content of this site and our XPs are copyright © 2000 to PK Data.