On Aug 20, 2013, at 12:36 PM, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote:
> On 19 Aug 2013, at 19:18, Alex Zavatone <z...@mac.com> wrote:
>> Sent from my iPad
>> 
>> On Aug 18, 2013, at 11:16 AM, "Gerriet M. Denkmann" <gerr...@mdenkmann.de> 
>> 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.
> 
> 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 
> options or finer control. (E.g. NSDictionary / CFDictionary).
> 
> But what is the story behind NS/UIView relative to CIImage, CGImage? When to 
> use what? What are the relevant advantages? 
> 
> I would really like to get some link to some documentation, which explains 
> these questions.


 NSImage/UIImage: Highest-level image abstraction, usually independent of 
pixels (e.g. may hold vector graphics, values are measured in Points, not 
pixels)
 CGImage: Highest-level pixel-based representation of an image, mostly measured 
in actual pixels, you have to do all Retina-work yourself.
 CIImage: Abstraction on top of textures on a graphics card for use as images. 
Useful if you want to quickly apply effects (CIFilter, transitions etc.) to an 
image, because the image is kept in GPU memory instead of RAM, so for applying 
several filters you save repeated up/downloads, and the filters run on many 
cores on the GPU, instead of blocking the few CPU cores your phone has.

Note that the abstraction is transparent. E.g. for bitmap images, NSImage these 
days uses a CGImageRef under the hood. Also, CGImageRefs try to be smart about 
keeping image data on the GPU if they can (so conceptually "use CIImage", if 
not actually).

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to