Is anyone know how to convert a image(such as *.bmp files) to HEX string in java,so the HEX string can used in the ^DG command(one of command in zpl).thanks!
It's not easy. You have to convert the image to 1-bit per pixel b/w, and then calculate the size including the bytes per row, and then properly form up the parameters of the ~DG
command to store it.
Or...
Zebra provides an API to convert images to GRFs (Zebra internal image type). There are a bunch of developer demos in the package, including a demo on how to print/store an image as a GRF on your printer
Hope this helps