add support for margin parameters in image module

Signed-off-by: Mattias Andrée <maandree@operamail.com>