简体   繁体   English

iOS-点,像素和打印

[英]iOS - points, pixels and printing

I am creating a UIImage that I want to print using iOS. 我正在创建要使用iOS打印的UIImage。 The printing type will be 打印类型为

printInfo.outputType = UIPrintInfoOutputGeneral;

or in other words, using regular paper. 或者换句话说,使用普通纸。

As far as I read, iOS will print at 72dpi. 据我了解,iOS将以72dpi打印。 So, if I want to print a UIImage with a 2x3 inche size on paper I need to create this image with 144 x 216 points, but how much is it in pixels for that UIImage? 因此,如果我想在纸上打印具有2x3英寸尺寸的UIImage,则需要创建144 x 216点的图像,但是该UIImage的像素值是多少? or in other words, which size should the image has? 或者换句话说,图像应具有什么尺寸?

thanks 谢谢

It looks to me that the 72dpi is actually saying 72 pixels. 在我看来,72dpi实际上是说72像素。 so your image size of 144 x 216 is actually the size you would want to print. 因此您的图像尺寸144 x 216实际上就是您要打印的尺寸。 The only reason the UIImageView is measured in points rather than pixels is because of the different screen resolutions. UIImageView以点而不是像素进行度量的唯一原因是因为屏幕分辨率不同。 The original iPhone has the same size screen as the 4s, but the screen of the 4s has a LOT more pixels in it. 原始的iPhone具有与4s相同的大小屏幕,但4s的屏幕中有很多像素。 Apple used points so that it is easier to program for all of the devices. 苹果使用积分,以便更轻松地为所有设备编程。 Check out this link: http://www.scantips.com/basics1a.html i just read through it and i hope it will answer your question. 请查看以下链接: http : //www.scantips.com/basics1a.html我刚刚阅读了它,希望它能回答您的问题。 I apologize if i confused you even more, I'm just trying to help! 如果您更加困惑您,我们深表歉意,我只是想提供帮助! :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM