update watermark.php which had a switch to detect using width or height first