I know how to change the dpi of a NSImageRep, but I can't figure out how to make CGImage APIs reflect this change... Is there a way to make CGImage write a file which is NOT a standard 72dpi? If I set a NSImageRep to be 144dpi, when I write it to file using CGImage APIs I always obtain a 72dpi image...
Thanks a lot
When you add an image to your destination with
CGImageDestinationAddImage
, you can pass a dictionary as theproperties
parameter. For this dictionary you can use all the keys specified in the CGImageProperties Reference, specificallykCGImagePropertyDPIWidth
andkCGImagePropertyDPIHeight
.