CHM files embed the picture while it's self there is no need to try and binary write it into the page. All you have to do is point to a local file and don't fully qualify the files name... e.g.
[img]picture1.jpg[/img] and at the CHM compile stage, the picture gets embedded in the CHM it's self.

Be carefull of some HTML editors they "fully qualify" the name e.g.
[img]c:\georges\website\picture1.jpg[/img] and this will make the CHM file look in the local computers directory for the picture.

Simple hey..