How to set color depth when converting HTML to PNG?

What is color depth?

The computers use color depth to control the number of color to display images. Color depth, also known as bit depth, is used to present the number of bits for each pixel. The higher the color depth, the clearer the image could be. Normally, color depth ranges from 1 to 24-bit. Though 32-bit color depth is possible, the color variations may be difficult to discern on screen. A 24-bit image allows 16,777,216 colors, so it is also called “Nature color”, and a 1-bit color depth image only has two colors, black and white.

What is HTML Converter Command Line for?

HTML Converter Command Line is a useful software application which can be used to render web pages via command line. You can use HTML Converter Command Line to convert HTML to PNG and other files in formats like PDF, PS (Postscript), TXT, TIF, TIFF, JPG, JPEG, GIF, BMP, HTML, WMF, PCX, PNG, JP2, PNM. You can download HTML Converter Command Line from

How to set color depth and convert HTML to PNG?

After you install HTML Converter Command Line, you can set color depth and convert HTML to PNG via command in the following way:

1. Run the command prompt window

  • Click “Start”;
  • Click “Run” to open the “Run” dialog box
  • In the “Run” dialog box,
    • A. Enter “cmd”;
    • B. Then click “OK”.


2. Enter a command line

When the black and white command prompt window appears on the computer screen, you should enter a command line according to the following pattern:

htmltools -bitcount <int> <HTML file> <PNG file>

The command pattern is composed of four factors:

  • htmltools refers to the executable file htmltools.exe, which is placed in the folder htmltools by default after the install file is decompressed.
  • -bitcount <int> is the command for color depth setting. The angle brackets enclose the essential content. int means integer, so the number following -bitcount must be an integer. As for this command, it should be 1, 8 or 24.
  • <HTML file> stands for the input file in HTML format
  • <PNG file> denotes to the output file in PNG format

To enter a command line in the command prompt window, you should enter the whole directories rather than only the names. For instance,

D:\htmltools\htmltools.exe -bitcount 8 D:\in\bu.html D:\out\bu.png

  • D:\htmltools\htmltools.exe is the directory of the executable file htmltools.exe, which is in the folder htmltools on disc D. You can change the directory if it is necessary.
  • -bitcount 8 is the command setting 8-bit for the output PNG file. The number can be replaced by 24 or 1.
  • D:\in\bu.html denotes the directory of the input HTML file, leading the computer to find the input file bu in the folder in on disk D. Again, it can be replaced.
  • D:\out\bu.png represents the directory of the output file. The output format is PNG, The name is bu, and this output file in the folder out on disk D.

3. Press “Enter”

Press the “Enter” key, and VeryPDF HTML Converter Command Line will convert HTML to PNG file in the color depth of 8-bit.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!