dump image command error

hi users,
I am trying to use the ‘amap’ option of the dump image command to produce JPG images for velocity ‘vx’ as parameter to atom color.
Here are the dump command used lines in my input file.

dump myDump all image 1000 dump.*.jpg vx vx

dump_modify myDump amap 0 75 cf 0.0 3 min green 0.5 yellow max blue

the error shows is:

ERROR: Cannot dump JPG file

Please anyone can suggest something to fix this error.