Re: How to detect a Retina Mac
Re: How to detect a Retina Mac
- Subject: Re: How to detect a Retina Mac
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 19 Aug 2013 16:30:35 +0700
On 19 Aug 2013, at 14:17, Lee Ann Rucker <email@hidden> wrote:
>> I seem to need a way to tell NSImage NOT to double the pixels for me, but I don't see any way to do this.
>
> Have you tried my sample code? This part seems to be what you're looking for:
>
> NSBitmapImageRep *bmpImageRep =
> [NSBitmapImageRep imageRepWith32bitBuffer:NULL
> pixelsWide:size.width * scale
> pixelsHigh:size.height * scale
> bitmapFormat:0
> bytesPerRow:0];
> // Setting the user size communicates the dpi.
> [bmpImageRep setSize:size];
> return bmpImageRep;
Yes, I did try this. But at that point I was still using NSImage, which, as Graham pointed out, is NOT really a good idea.
Thanks for your help!
Kind regards,
Gerriet.
_______________________________________________
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