Click here to Skip to main content
15,906,081 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to ask about the convertion to pixel

The more detail:
My instructor gave us this question:
(a) Write a computer program capable of shrinking an image by bilinear interpolation. The input to your program is the desired resolution of the resulting image. (b)use your program to shrink this from 1250 dpi to 100 dpi. (c) Use your program to zoom the image in (b) back to 1250 dpi. Explain the reasons for their differences.


<b>What I need now , ONLY How can I convert in math from dpi to pixels. </b>

Our textbook always deals with the image in pixels such as 1024*1044.

Can anyone guide me in this mathmatical problem?

Thank you
Posted

1 solution

There is no such problem. "DPI" means "dots per inch", which is the resolution of a bitmap in some device like a printer. Important to note: this characteristic is often included in bitmap meta-data, but it does not affect any properties of the bitmap, whatsoever. This is a formal parameter which can be understood as "recommended resolution" or something like that. In contrast, the pixel dimension such as 1024x1044 is the most important characteristic the image which cannot even be correctly displayed without this meta-data item.

These to characteristics are not "convertable" because they are expressed in incompatible units and means completely different things. The question makes no sense at all.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900