Re: Image classes (Re: How to detect a Retina Mac)

2013-09-06 Thread Ken Ferry
FYI, I went into this question in some detail in this talk from WWDC 2009: Session 111: NSImage in Snow Leopard The last part of the talk is a discussion of the differences be

Image classes (Re: How to detect a Retina Mac)

2013-08-21 Thread Marcel Weiher
On Aug 20, 2013, at 18:02 , Uli Kusterer wrote: > On Aug 20, 2013, at 12:36 PM, Gerriet M. Denkmann > wrote: >> Well that much I know. And I also know that many NS/UI-things (which use >> Objective-C) often have a CF-counterpart, which uses plain C and often these >> are toll-free bridged. T

Re: How to detect a Retina Mac

2013-08-20 Thread Uli Kusterer
On Aug 20, 2013, at 12:36 PM, Gerriet M. Denkmann wrote: > Well that much I know. And I also know that many NS/UI-things (which use > Objective-C) often have a CF-counterpart, which uses plain C and often these > are toll-free bridged. The latter kind is typically used when one needs more > opt

Re: How to detect a Retina Mac

2013-08-20 Thread Uli Kusterer
On Aug 20, 2013, at 12:36 PM, Gerriet M. Denkmann wrote: > On 19 Aug 2013, at 19:18, Alex Zavatone wrote: >> Sent from my iPad >> >> On Aug 18, 2013, at 11:16 AM, "Gerriet M. Denkmann" >> wrote: >> >>> But I do not understand it. CIImage, CGImage, NSImage >> >> I know it's not much, but CI =

Re: How to detect a Retina Mac

2013-08-20 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 19:18, Alex Zavatone wrote: > Sent from my iPad > > On Aug 18, 2013, at 11:16 AM, "Gerriet M. Denkmann" > wrote: > >> But I do not understand it. CIImage, CGImage, NSImage > > I know it's not much, but CI = Core Image, CG = Core Graphics and NS = Next > Step (Mac). UI I

Re: How to detect a Retina Mac

2013-08-19 Thread Alex Zavatone
Sent from my iPad On Aug 18, 2013, at 11:16 AM, "Gerriet M. Denkmann" wrote: > But I do not understand it. CIImage, CGImage, NSImage I know it's not much, but CI = Core Image, CG = Core Graphics and NS = Next Step (Mac). UI Image would be for iOS, if I'm not mistaken. __

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 12:56 PM, "Gerriet M. Denkmann" wrote: > NSGraphicsContext *originalContext = [NSGraphicsContext > currentContext]; > ... do stuff ... > [NSGraphicsContext setCurrentContext: originalContext ]; or more simply: [NSGraphicsContext saveGraphicsState

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 17:35, Graham Cox wrote: > > On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann wrote: > >> Here is the final code (if there is anything wrong or not quite right, >> please feel free to critizise it): > >> [NSGraphicsContext setCurrentContext: bitmapContext2 ]; > > >

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann wrote: > Here is the final code (if there is anything wrong or not quite right, please > feel free to critizise it): > [NSGraphicsContext setCurrentContext: bitmapContext2 ]; You might want to save and restore the current graphics context

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 14:17, Graham Cox wrote: > > On 19/08/2013, at 9:01 AM, Gerriet M. Denkmann 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. >> Like: [ image setBackingScaleFactor: 1 ] but no such method seems to exis

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 14:17, Lee Ann Rucker 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 = > [NSBit

Re: How to detect a Retina Mac

2013-08-19 Thread Graham Cox
On 19/08/2013, at 9:01 AM, Gerriet M. Denkmann 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. > Like: [ image setBackingScaleFactor: 1 ] but no such method seems to exist. > > > So hardcoding the retina-ness of my current c

Re: How to detect a Retina Mac

2013-08-19 Thread Lee Ann Rucker
> 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

Re: How to detect a Retina Mac

2013-08-19 Thread Simone Tellini
Il giorno 19/ago/2013, alle ore 09:01, "Gerriet M. Denkmann" ha scritto: > > On 19 Aug 2013, at 06:41, Marcel Weiher wrote: [...] > I also tried (before [image lockFocus]: > NSGraphicsContext *bitmapContext = [ NSGraphicsContext > graphicsContextWithBitmapImageRep: imageRep ];

Re: How to detect a Retina Mac

2013-08-19 Thread Gerriet M. Denkmann
On 19 Aug 2013, at 06:41, Marcel Weiher wrote: My problem is: "... some drawing here ..." seems to assume a locked NSImage in place. It looks like: NSUInteger graphicIndex = [graphics count]; while (graphicIndex-- > 0) { SKTGr

Re: How to detect a Retina Mac

2013-08-18 Thread Marcel Weiher
Hi Gerriet, On Aug 18, 2013, at 17:16 , Gerriet M. Denkmann wrote: >> [Tom Davie] >> Uhh sorry, my bad, I meant CG*Bitmap*ContextCreate… >> >> http://developer.apple.com/library/ios/documentation/graphicsimaging/Reference/CGBitmapContext/Reference/reference.html > > Ah, now I found lots of inf

Re: How to detect a Retina Mac

2013-08-18 Thread Lee Ann Rucker
ithSize:size rep1:bitmap1x rep2:bitmap2x]; } @end - Original Message - From: "Gerriet M. Denkmann" To: "Tom Davie" Cc: "Cocoa Dev List" Sent: Sunday, August 18, 2013 8:16:47 AM Subject: Re: How to detect a Retina Mac On 18 Aug 2013, at 21:03, Tom Da

Re: How to detect a Retina Mac

2013-08-18 Thread Gerriet M. Denkmann
On 18 Aug 2013, at 21:03, Tom Davie wrote: > > On 18 Aug 2013, at 15:56, Gerriet M. Denkmann wrote: > >> >> On 18 Aug 2013, at 20:09, Tom Davie wrote: >> >>> >>> On 18 Aug 2013, at 15:03, Gerriet M. Denkmann wrote: >>> I just noticed that the program I use to create Png files creat

Re: How to detect a Retina Mac

2013-08-18 Thread Tom Davie
On 18 Aug 2013, at 16:27, Simone Tellini wrote: > > Il giorno 18/ago/2013, alle ore 15:03, "Gerriet M. Denkmann" > ha scritto: > >> 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

Re: How to detect a Retina Mac

2013-08-18 Thread Simone Tellini
Il giorno 18/ago/2013, alle ore 15:03, "Gerriet M. Denkmann" ha scritto: > 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

Re: How to detect a Retina Mac

2013-08-18 Thread Tom Davie
On 18 Aug 2013, at 15:56, Gerriet M. Denkmann wrote: > > On 18 Aug 2013, at 20:09, Tom Davie wrote: > >> >> On 18 Aug 2013, at 15:03, Gerriet M. Denkmann wrote: >> >>> I just noticed that the program I use to create Png files creates files >>> with twice the number of pixels in each dimen

Re: How to detect a Retina Mac

2013-08-18 Thread Gerriet M. Denkmann
On 18 Aug 2013, at 20:09, Tom Davie wrote: > > On 18 Aug 2013, at 15:03, Gerriet M. Denkmann 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

Re: How to detect a Retina Mac

2013-08-18 Thread Tom Davie
On 18 Aug 2013, at 15:03, Gerriet M. Denkmann 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 prog

How to detect a Retina Mac

2013-08-18 Thread Gerriet M. Denkmann
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. But: how do I detect that the programm is running on a compu