我知道如何更改NSImageRep的dpi,但我不知道如何让CGImage API反映这种更改……有没有办法让CGImage写一个不是标准72dpi的文件?如果我将NSImageRep设置为144dpi,当我使用CGImage API将其写入文件时,我总是获得72dpi的图像...
非常感谢
发布于 2012-05-15 00:29:54
当您使用CGImageDestinationAddImage将图像添加到目标位置时,可以将字典作为properties参数传递。对于本字典,您可以使用CGImageProperties Reference中指定的所有键,特别是kCGImagePropertyDPIWidth和kCGImagePropertyDPIHeight。
https://stackoverflow.com/questions/10587083
复制相似问题