Update generator.js

Subtract 2 from width and height added to canvas size by -border in trimImages