Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get pixel position of particular point upon resizing the image i.e changing the resolution of image

Hi I have image of 1130*2074 resolution I marked a point at pixel 500,430 I have resized it to 1280*1024 how to get changed pixel position i.e what will be the new position of pixel 500,430 I know that basically pixel size was affected but still..

like image 584
richi arora Avatar asked Nov 21 '10 14:11

richi arora


People also ask

How do I keep resolution when resizing?

If you want to resize an image without losing quality, you need to make sure that the "Resample" checkbox is unchecked. This checkbox tells Paint to change the number of pixels in the image. When you uncheck this box, Paint will not change the number of pixels, and the quality of the image will not be reduced.

Does resizing an image reduce quality?

Does resizing an image affect its quality? It definitely can! Typically, making an image smaller will not impact the quality, but an image can suffer quality loss when scaled beyond its original size.

How do I fix the resolution of a picture in HTML?

You can simply manipulate the display size of the image using the width and height CSS or HTML attributes. This won't change the actual resolution of the image, it will just display it smaller or larger.


1 Answers

newX = (500/1130)*1280;
newY = (430/2074)*1024;

In general:

newX = (currentX/currentWidth)*newWidth
newY = (currentY/currentHeight)*newHeight
like image 53
Femaref Avatar answered Oct 20 '22 01:10

Femaref