Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is CGinterpolationquality?

I've implemented a camera into my app and I wanted to know what CGinterpolationquality is. There isn't much documentation on what it does.

like image 515
deadlock Avatar asked Jun 24 '13 21:06

deadlock


People also ask

What is quality interpolation?

Interpolation quality is a graphics state parameter that provides a hint for the level of quality to use for image interpolation (for example, when scaling the image). Not all contexts support all interpolation quality levels.

What is CG context?

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

From the CGContext Reference:

Returns the current level of interpolation quality for a graphics context.

Interpolation quality is a graphics state parameter that provides a hint for the level of quality to use for image interpolation (for example, when scaling the image). Not all contexts support all interpolation quality levels.

Furthermore...

CGInterpolationQuality

Levels of interpolation quality for rendering an image.

enum CGInterpolationQuality {
   kCGInterpolationDefault = 0,
   kCGInterpolationNone = 1,
   kCGInterpolationLow = 2,
   kCGInterpolationMedium = 4,
   kCGInterpolationHigh = 3
};
typedef enum CGInterpolationQuality CGInterpolationQuality;

kCGInterpolationDefault: The default level of quality.

kCGInterpolationNone: No interpolation.

kCGInterpolationLow: A low level of interpolation quality. This setting may speed up image rendering.

kCGInterpolationMedium: A medium level of interpolation quality. This setting is slower than the low setting but faster than the high setting.

kCGInterpolationHigh: A high level of interpolation quality. This setting may slow down image rendering.

like image 117
rog Avatar answered Oct 22 '22 01:10

rog