Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Image vs Core Graphics

Tags:

ios

I am making an application that uses basic core Graphics functions . The Application runs reasonably well on Ipad2, but there is a performance hit on Ipad3 due to retina display, which causes drawing to be done on number of pixels 4 times to the earlier. I tried some hacks to improve performance, but since drawing takes place on gestures in my code, I think I will have to switch on to some other alternative. I was wanting to ask if Core Image provides all the functionalities that can be performed using Core Graphics, so that I may use GPU Processing capability. If not, what could be the best alternative so that I can use the same functionalities with a better processing capability.

like image 934
user1414340 Avatar asked May 24 '12 07:05

user1414340


People also ask

What is the meaning of core image?

Core Image is an image processing and analysis technology designed to provide near real-time processing for still and video images. It operates on image data types from the Core Graphics, Core Video, and Image I/O frameworks, using either a GPU or CPU rendering path.

What is Core Graphics in IOS?

Core Graphics is a low-level 2D graphics framework that allows drawing device independent graphics. All 2D drawing in UIKit uses Core Graphics internally. Core Graphics supports drawing in a number of scenarios including: Drawing to the screen via a UIView . Drawing images in memory or on screen.

What graphics library does Mac use?

In Apple's macOS operating system, Quartz is the Quartz 2D and Quartz Compositor part of the Core Graphics framework.

What is CGContext?

The CGContext type represents a Quartz 2D drawing destination. A graphics context contains drawing parameters and all device-specific information needed to render the paint on a page to the destination, whether the destination is a window in an application, a bitmap image, a PDF document, or a printer.


1 Answers

Core Image and Core Graphics are very different. Core Image is an image processing technology. You can apply pre-made filters like sepia, black and white, and color invert, or you can create custom filters. Core Graphics is a rendering API utilizing Quartz 2D technologies that allows for complex drawing.

Brad Larson's GPUImage is a great alternative/addition to Core Image. You can find it here.

If you want improved performance, you can try a low level API like OpenGL. It's difficult to learn, but here are a few links to get you started:

  • iPhone OpenGL ES – 8 Great Resources For Learning - From ManiacDev, self-explanatory
  • OpenGL ES Programming Guide for iOS - Apple's own documentation, thorough, a good start
  • iOS based OpenGL ES programming - Some more resources for getting started
  • OpenGL ES 2.0 for iPhone Tutorial - Good Ray Wenderlich introduction
  • Pro OpenGL ES for iOS - Great Apress book but not for beginners
like image 161
pasawaya Avatar answered Sep 25 '22 08:09

pasawaya