Re: How to detect a Retina Mac
Re: How to detect a Retina Mac
- Subject: Re: How to detect a Retina Mac
- From: Tom Davie <email@hidden>
- Date: Sun, 18 Aug 2013 15:09:46 +0200
On 18 Aug 2013, at 15:03, Gerriet M. Denkmann <email@hidden> wrote:
> I just noticed that the program I use to create Png files creates files with twice the number of pixels in each dimension.
> Obviously because since I last used it, I have switched to a Retina Mac Book.
>
> Ok, so I have to fix this program.
The correct way to fix this problem is to create an image via CGContextCreate and CGContextCreateImage. When doing this you specify pixel rather than point dimensions, and do not have the issue you’re experiencing. You detect a retina device by testing scaleFactor as you suggested, it’s just unnecessary here.
Tom Davie
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden