CGImageRef 的 参数解释
来源:互联网 发布:怎么样删除淘宝评价 编辑:程序博客网 时间:2024/05/17 20:00
CGImageRef CGImageCreate (
size_t width,
size_t height,
size_t bitsPerComponent,
size_t bitsPerPixel,
size_t bytesPerRow,
CGColorSpaceRef colorspace,
CGBitmapInfo bitmapInfo,
CGDataProviderRef provider,
const CGFloat decode[],
bool shouldInterpolate,
CGColorRenderingIntent intent
);
kCGImageAlphaPremultipliedLast
provider = CGDataProviderRef;
decode
The width, in pixels, of the required image. 图像的宽度
The height, in pixels, of the required image 图像的高度
The number of bits for each component in a source pixel. For example, if the source image uses the RGBA-32 format, you would specify 8 bits per component.
参数bitsPerComponent被渲染内存区域中组件在屏幕每个像素点上需要使用的bits(位数),举例来说,如果使用32-bit 像素和RGB颜色格式,那么RGBA颜色格式中每个组件在屏幕每个像素点上需要使用的bits位就为32/4=8。
bitsPerPixel
The total number of bits in a source pixel. This value must be at least bitsPerComponent
times the number of components per pixel.
参数bitsPerPixel表示每个像素所占的bits(位数), 这个值必需是 bitsPerComponent的倍数
The number of bytes of memory for each horizontal row of the bitmap.
参数bytesPerRow代表被渲染内存区域中每行所使用的bytes(字节数)。
The color space for the image. Quartz retains the color space you pass in; on return, you may safely release it.
参数colorspace用于被渲染内存区域的“位图上下文”
A CGBitmapInfo
constant that specifies whether the bitmap should contain an alpha channel and its relative location in a pixel, along with whether the components are floating-point or integer values.
参数bitmapInfo指定被渲染内存区域的“视图”是否包含一个alpha(透视)通道以及每个像素相应的位置,除此之
外还可以指定组件式是浮点值还是整数值。
The source of data for the bitmap. For information about supported data formats, see the discussion below. Quartz retains this object; on return, you may safely release it.
参数provider指定bitmap的数据
The decode array for the image. If you do not want to allow remapping of the image’s color values, pass NULL
for the decode array. For each color component in the image’s color space (including the alpha component), a decode array provides a pair of values denoting the upper and lower limits of a range. For example, the decode array for a source image in the RGB color space would contain six entries total, consisting of one pair each for red, green, and blue. When the image is rendered, Quartz uses a linear transform to map the original component value into a relative number within your designated range that is appropriate for the destination color space.
A Boolean value that specifies whether interpolation should occur. The interpolation setting specifies whether Quartz should apply a pixel-smoothing algorithm to the image. Without interpolation, the image may appear jagged or pixelated when drawn on an output device with higher resolution than the image data.
A rendering intent constant that specifies how Quartz should handle colors that are not located within the gamut of the destination color space of a graphics context. The rendering intent determines the exact method used to map colors from one color space to another. For descriptions of the defined rendering-intent constants, see Color Rendering Intents
.
- CGImageRef 的 参数解释
- CGImageRef像素位图参数说明
- 参数传递的解释
- 两个参数的解释
- 音频参数的解释
- 三极管的参数解释
- autotrace参数的解释
- dataguard参数的解释
- 手机充电器的参数解释
- 音频参数的解释
- Flexpaper的参数解释
- ajax的参数解释
- Xgboost的参数解释
- 参数session_cached_cursors的详细解释
- DeviceIoControl一些参数的解释
- 对g_signal_new()参数的解释
- LoadRunner参数的详细解释
- Linux bond的参数解释
- Linux 多线程编程( POSIX )( 二 )----->代码区 ( pthread_attr_t 线程属性实例 )
- Linux 多线程编程( POSIX )( 二 )----->pthread_attr_t 线程属性
- memcached简单的使用教程
- 自学嵌入式 linux C好迷茫
- qemu指令计数
- CGImageRef 的 参数解释
- 私人云服务Jolicloud Me:收录用户在Web上的所有分享内容
- one question about type casting
- ☆【线性规划】【容斥原理】【NOI2010】能量采集
- C#实现检查指定端口被哪个进程占用
- Object Pascal语言基础
- Python 中不常见builtinfunction
- ADD FACEBOOK CONNECT TO A UNITY IPHONE GAME
- Intuit在线捐赠应用掀起新的移动支付热潮