我有一个宽度为 1980 和高度为 1080 的图像,其中 x =759,y = 786,w = 369,h = 100。我想将此图像转换为宽度 = 640 和高度 = 480。如何根据新的图像格式?
As you know the actual (W,H) and new image format (newW,newH) then
newX = (newW/W) * x
and do the same for other value...
Edit:
newY = (newH/H) * y
And the same for other value.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.