class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
However, you can first process your uploaded image, and save it somewhere. Then, you read image_dst_x and image_dst_y.
You instanciate another class, and resize your watermark to these dimensions you got. Once your watermark is ready, you instantiate the class a third time, and apply the new watermark to the image you previously uploaded.
Note that if you don't need to resize the uploaded image, you can prepare your watermark before calling process() on the uplaoded image, reading image_src_x and image_src_y instead.Reply
However, you can first process your uploaded image, and save it somewhere. Then, you read image_dst_x and image_dst_y.
You instanciate another class, and resize your watermark to these dimensions you got. Once your watermark is ready, you instantiate the class a third time, and apply the new watermark to the image you previously uploaded.
Note that if you don't need to resize the uploaded image, you can prepare your watermark before calling process() on the uplaoded image, reading image_src_x and image_src_y instead.