var express = require('express');
var gm = require('gm');
var hashblot = require('hashblot');

function encode(str) {
  return encodeURIComponent(str).replace(/%20/g,'+')}
function decode(str) {
  return decodeURIComponent(str.replace(/\+/g,' '))}

module.exports = function appctor(opts) {
  var gmopts = opts.gm || {};

  var app = express();

  app.get('/sha1q/:size/:input.png', function sha1qpPng(req, res, next) {
    var str = req.params.input;

    gm(req.params.size, req.params.size, '#fff')
      .options(gmopts)
      .fill('#000').draw('path ' + hashblot.sha1qpd(str))
      .toBuffer('PNG',function (err, buffer) {
        if (err) return next(err);
        res.type('png');
        res.send(buffer);
      });
  });

  return app;
};

@@ -449,16 +449,23 @@
 ut;%0A
-%0A
     
-gm(
+var size = 
 req.
@@ -479,21 +479,24 @@
 size
-, req.params.
+;%0A%0A    gm(size, 
 size
@@ -504,23 +504,16 @@
  '#fff')
-%0A      
 .options
@@ -532,35 +532,111 @@
    .
+draw(%5B%0A        'viewbox 0 0 255 255',%0A        '
 fill
-('
+ 
 #000'
-).draw(
+,%0A        'fill-rule nonzero',%0A        
 'path
- ' +
+',
  has
@@ -653,16 +653,27 @@
 qpd(str)
+%5D.join(' ')
 )%0A      

Add viewbox, fill, and fill-rule in draw command