转换为数学像素 [英] convert to pixel in math

查看:200
本文介绍了转换为数学像素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下转换为像素的情况

更多详细信息:
我的老师给了我们这个问题:
(a)编写一个能够通过双线性插值缩小图像的计算机程序.程序的输入是所需结果图像的分辨率. (b)使用您的程序将其从1250 dpi缩小到100 dpi. (c)使用您的程序将(b)中的图像缩放回1250 dpi.解释造成差异的原因.

< b>我现在只需要什么,如何在数学上将dpi从dpi转换为像素. </b>

我们的教科书总是以像素为单位处理图像,例如1024 * 1044.

有人可以指导我解决这个数学问题吗?

谢谢

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

推荐答案

没有这样的问题. "DPI"表示每英寸点数",它是某些设备(如打印机)中位图的分辨率.重要说明:此特性通常包含在位图元数据中,但不影响位图的任何属性.这是一个形式参数,可以理解为建议的分辨率"或类似的东西.相反,像素尺寸(例如1024x1044)是图像的最重要特征,如果没有此元数据项,图像将无法正确显示.

这些到特性不是可转换的",因为它们以不兼容的单位表示并且意味着完全不同的事物.这个问题根本没有道理.

—SA
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


这篇关于转换为数学像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆