Optimize dump_image.jsx
Optimize dump_image.
Fix dump image.
Simplify code.