To avoid any misunderstanding, you can use the actual chdman but it can, depent of the available raw CD format, a bit more complex to create a image in .CHD format.
For .CDI, .IMG, .NRG images you need a CD burning tool (mode2_raw format with 2352 bytes/sector) to create BIN/CUE or DAT/TOC files.

Example for the DAT/TOC file:

chdman -createcd cd.toc cd.chd

Example for the BIN/CUE file:

chdman -createcd cd.cue cd.chd