Confusion over quartz2d, ​​main graphics, main animation, main images

I am working on a project that requires some image processing, I also asked a question about it, and I got a very good solution, here is the link to create a completely new image in iOS, choosing different properties

but now I want to study this in more detail, and I am confused where I should start to study quartz 2d or basic animation or main graphics or the image of the kernel.

Apple documents say about quartz 2d that

The Quartz 2D API is part of the Core Graphics framework, so you can see Quartz called Core Graphics or, simply, CG.

and apple docs talk about a baseline that

Structure Core Graphics is a C-based API based on Quartz Enhanced Drawing Engine.

it confuses how they are both related to each other ...

Now the main animation contains all the concepts of coordinates, borders, frames, etc., which are also necessary when drawing images

and kernel image introduced in ios 5

where should I start to study or in what sequence do I start to study all this.

+16
ios
Feb 12 '12 at 11:50
source share
2 answers

Quartz and Core Graphics are synonyms. I tend to avoid the use of “quartz” because this term is very prone to confusion (indeed, the structure that includes Core Animation, “QuartzCore,” is even more confusing).

I would say:

  • Explore Core Graphics (CoreGraphics.framework) if you need high-performance vector graphics (lines, rectangles, circles, text, etc.), possibly mixed with bitmap / bitmap graphics with simple modifications (e.g. scaling, rotation, borders and etc.). Core Graphics is especially not suitable for more advanced operations with raster images (for example, color correction). This can do a lot in the way of raster / raster operations, but it is not always obvious or simple. In short, Core Graphics is best suited for use in Illustrator / Freehand / OmniGraffle style.

  • Check out Core Animation (inside QuartzCore.framework) if you need to animate the content. Basic animations (for example, moving the view around the screen) can be done completely without Core Animation using the basic functions of UIView, but if you want to make a more attractive animation, Core Animation is your friend. In some ways unintuitive, Core Animation is also home to the CALayer class families, which, in addition to animation, allow you to do some more interesting things, such as fast (albeit poorly performing) shadows and 3D transforms (giving you something to think about as "bad person OpenGL"). But it is mainly used to animate content (or content properties such as color and opacity).

  • Check out Core Image (inside QuartzCore.framework) if you need high performance, accurate image processing. It can be everything from color correction to lens flashes to blur and something in between. Apple publishes a filter link that lists the various predefined main image filters that are available. You can also write your own, although this is not necessary for the faint of heart. In short, if you need to implement something like "[choose your favorite photo editor]", then Core Image is your go-to.

Does this clarify the issue?

+41
Feb 12 '12 at 12:08
source share

Core Animation is a technology that relies on OpenGL a lot more, which means its binding to the GPU.

Core Graphics, on the other hand, uses the CPU for rendering. It is much more accurate (in pixels) than Core Animation, but it will use your processor.

+3
04 Sep '13 at 14:57
source share



All Articles