BmpCvtST 以command line執行轉圖流程

Command Table


picture轉存bitmap指令:

Bmpcvtst.exe <FILE NAME> – convertintobw –saveas<FILE NAME>,<TYPE>,[<FORMAT>],[<NOPALETTE>] -exit


Example:

1. Conditions: bw, 1bpp, c-format

Bmpcvtst.exe "apple_294x362.jpg" –convertintobw –saveas"apple_294x362_bw_1bpp",1,1 -exit

 

2. Conditions: bw, 8bpp, c-format

Bmpcvtst.exe "apple_294x362.jpg" –convertintobw –saveas"apple_294x362_bw_8bpp",1,5 –exit

 

3. Conditions: 4-gray, 2bpp, c-format

Bmpcvtst.exe "apple_294x362.jpg" –convertintogray4 –saveas"apple_294x362_gray4_2bpp",1,2 –exit

 

4. Conditions: 4-gray, 1bpp, c-format

Bmpcvtst.exe "apple_294x362.jpg" –convertintogray4 –saveas"apple_294x362_gray4_1bpp",1,1 –exit

此為錯誤條件, 4-gray每個pixel最低要2-bits, 無法以1-bit實現4-Gray

在目錄下會出現Error Log說明”FORMAT does not match image.”

<FORMAT>參數可忽略不設, 會自動以最低位元數儲存



5. Conditions: 4-gray, 2bpp, c-stream (*.dat)

Bmpcvtst.exe "apple_294x362.jpg" –convertintogray4 –saveas"apple_294x362_gray4_1bpp",3,2 –exit


[Header]

2 Bytes - Id (0x42, 0x4d, "BM")

16 Bits - unknown

16 Bits - xSize

16 Bits - ySize

16 Bits - Bytes Per Line

16 Bits - Bits Per Pixel

32 Bits – Number of Color

[Color Palette]

32 Bits - ARGB8888 Format

[Pixel Data]


ref : https://www.segger.com/doc/UM03001_emWin.html#Command_line_usage

留言

這個網誌中的熱門文章

[VB6]使用File Dialog選擇檔案

[VB6]MSFlexGrid使用記錄