Export Worksheet or Chart into Image with Desired Width and Height

Contents
[ ]

The following code exports the worksheet into an image with 400x400 size.