main code of watermark generator