Resources Base
Table of contents

File Types

DWT supports the following file types.


BMP is an uncompressed image format. Such a file is huge because of the lack of compression. A lower limit on storage size for a n-bit-per-pixel bitmap, in bytes, can be calculated as:

size = width * height * n/8; // where height and width are given in pixels

For example, a US Letter sized paper scanned in 300 DPI and in colour has the size of (8.5 * 300) * (11 * 300) * 24 / 8 = 25, 245, 000 bytes which is close to 24 MB.


The JPEG format supports eight-bit grayscale images and 24-bit color images (eight bits each for red, green, and blue). Black & white image data which is 1-bit can not be saved in this format.

This format applies lossy compression to images, which can result in a significant reduction of the file size. Applications can determine the degree of compression to apply, and the amount of compression affects the visual quality of the result. DWT uses the API JPEGQuality to control this.


The API JPEGQuality affects the degree of compression of the file as long as it uses the JPEG compression type. In other words, a TIFF file or a PDF file using JPEG compression will also be affected.


Compared with BMP and JPEG , the TIFF format is more like a container that holds image(s) and data in a single file. A TIFF file uses tags to describe the data it holds so that applications know how to read it. DWT allows custom tags with the APIs ClearTiffCustomTag() and SetTiffCustomTag() .

TIFF also allows multiple images in the same file. DWT controls this with the API IfTiffMultiPage .


The PNG format supports lossless data compression. The same image may save bigger as a .png than a .jpg but it preserves all information.


The PDF format is an advanced and popular file format that allows a variety of content. Because of the complexity of the format, it is impractical for a lightweight SDK such as DWT to have full support for it. Instead, DWT supports the format in two ways

  • DWT can read and write a pure-image-based PDF file;
  • DWT can use its PDF Rasterizer module to rasterize almost any PDF file and convert its visible content into images so as to “read” it.

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    • Version 16.1.1
    Change +
    © 2003–2020 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support