I'm having a problem with applying a watermark to uploaded images, the main problem is the image resolution since my watermark image has a 30dpi resolution while uploaded images ranges 30 ~ 300 dpi resolution, so the watermark is not of the correct size respect the image (too small / too big) and i'm unable to find a math formula to resize it correctly.
float offest = imgU.HoriziontalResolution / imgW.HoriziontalResolution
this is where i start to elaborate the proportion between the two images, the first is the uploaded image while the second in my watermark. My watermark is 120x20 and 30dpi while the uploaded images ranged between 300x50 and 30 ~ 300 dpi in size.
I also have the problem to correctly align my watermark to the bottol left corner since of the different proportion that doesnt allow me to correctly calculate the y offets to place it at.
Aucun commentaire:
Enregistrer un commentaire