iOS中ImageIO框架详解与应用分析(三)

五、CGImageProperties中定义的字典意义


   前面提到的CGImageSourceCopyProperties方法与CGImageSourceCopyPropertiesAtIndex方法都会返回一个字典,字典中可能包含如下有意义的键:


//TIFF信息字典

const CFStringRef kCGImagePropertyTIFFDictionary;

/GIF信息字典

const CFStringRef kCGImagePropertyGIFDictionary;

//JFIF信息字典

const CFStringRef kCGImagePropertyJFIFDictionary;

//EXif信息字典

const CFStringRef kCGImagePropertyExifDictionary;

//PNG信息字典

const CFStringRef kCGImagePropertyPNGDictionary;

//IPTC信息字典

const CFStringRef kCGImagePropertyIPTCDictionary;

//GPS信息字典

const CFStringRef kCGImagePropertyGPSDictionary;

//原始信息字典

const CFStringRef kCGImagePropertyRawDictionary;

//CIFF信息字典

const CFStringRef kCGImagePropertyCIFFDictionary;

//佳能相机信息字典

const CFStringRef kCGImagePropertyMakerCanonDictionary;

//尼康相机信息字典

const CFStringRef kCGImagePropertyMakerNikonDictionary;

//柯尼卡相机信息字典

const CFStringRef kCGImagePropertyMakerMinoltaDictionary;

//富士相机信息字典

const CFStringRef kCGImagePropertyMakerFujiDictionary;

//奥林巴斯相机信息字典

const CFStringRef kCGImagePropertyMakerOlympusDictionary;

//宾得相机信息字典

const CFStringRef kCGImagePropertyMakerPentaxDictionary;

//对应Photoshop相片的信息字典

const CFStringRef kCGImageProperty8BIMDictionary;

//NDG信息字典

const CFStringRef kCGImagePropertyDNGDictionary ;

//ExifAux信息字典

const CFStringRef kCGImagePropertyExifAuxDictionary;

//OpenEXR信息字典

const CFStringRef kCGImagePropertyOpenEXRDictionary;

//Apple相机信息字典

const CFStringRef kCGImagePropertyMakerAppleDictionary ;

CGImageSourceCopyProperties方法返回的字典中还可能会有如下一个特殊的键:


//对应文件大小

const CFStringRef kCGImagePropertyFileSize;

CGImageSourceCopyPropertiesAtIndex方法中可能包含的特殊键:


//像素高度

const CFStringRef kCGImagePropertyPixelHeight;

//像素宽度

const CFStringRef kCGImagePropertyPixelWidth;

//DPI高度

const CFStringRef kCGImagePropertyDPIHeight;

//DPI宽度

const CFStringRef kCGImagePropertyDPIWidth;

//颜色位数

const CFStringRef kCGImagePropertyDepth;

//图片的显示方向

/*

对应Number值

*   1  =  左上到右下.  

*   2  =  右上到左下.  

*   3  =  右下到左上.

*   4  =  左下到右上.  

*   5  =  行列置换 左上到右下.  

*   6  =  行列置换 右上到左下.  

*   7  =  行列置换 右下到左上.  

*   8  =  行列置换 左下到右上.

*/

const CFStringRef kCGImagePropertyOrientation;

//颜色是否支持浮点数

const CFStringRef kCGImagePropertyIsFloat;

//图像是否包含像素样本

const CFStringRef kCGImagePropertyIsIndexed;

//图像是否包含alpha通道

const CFStringRef kCGImagePropertyHasAlpha;

//图像的颜色模式

const CFStringRef kCGImagePropertyColorModel;

//嵌入图片的ICC配置文件名称

const CFStringRef kCGImagePropertyProfileName;

kCGImagePropertyColorModel键可返回的值有如下几种定义:


//RBG模式

const CFStringRef kCGImagePropertyColorModelRGB;

//Gray模式

const CFStringRef kCGImagePropertyColorModelGray;

//CMYK模式

const CFStringRef kCGImagePropertyColorModelCMYK;

//Lab模式

const CFStringRef kCGImagePropertyColorModelLab;

kCGImagePropertyTIFFDictionary键可返回的值定义如下:


//图片数据压缩方案

const CFStringRef kCGImagePropertyTIFFCompression;

//图片数据的色彩空间

const CFStringRef kCGImagePropertyTIFFPhotometricInterpretation;

//文档名称

const CFStringRef kCGImagePropertyTIFFDocumentName;

//图片描述

const CFStringRef kCGImagePropertyTIFFImageDescription;

//相机设备名

const CFStringRef kCGImagePropertyTIFFMake;

//相机设备模式

const CFStringRef kCGImagePropertyTIFFModel;

//图片方向

const CFStringRef kCGImagePropertyTIFFOrientation;

//横向每个分辨位的像素数

const CFStringRef kCGImagePropertyTIFFXResolution;

//纵向每个分辨位的像素数

const CFStringRef kCGImagePropertyTIFFYResolution;

//分辨率单位

const CFStringRef kCGImagePropertyTIFFResolutionUnit;

//创建图像的软件名称和版本

const CFStringRef kCGImagePropertyTIFFSoftware;

//transform函数

const CFStringRef kCGImagePropertyTIFFTransferFunction;

//日期时间

const CFStringRef kCGImagePropertyTIFFDateTime;

//作者

const CFStringRef kCGImagePropertyTIFFArtist;

//创建图片的电脑系统

const CFStringRef kCGImagePropertyTIFFHostComputer;

//公司信息

const CFStringRef kCGImagePropertyTIFFCopyright;

//图片的白点

const CFStringRef kCGImagePropertyTIFFWhitePoint;

//图像的原色色度

const CFStringRef kCGImagePropertyTIFFPrimaryChromaticities;

//图片的瓦片宽度

const CFStringRef kCGImagePropertyTIFFTileWidth;

//图片的瓦片高度

const CFStringRef kCGImagePropertyTIFFTileLength;

kCGImagePropertyJFIFDictionary对应的字典中可能包含如下意义的键:


//JFIF版本

const CFStringRef kCGImagePropertyJFIFVersion;

//横向像素密度

const CFStringRef kCGImagePropertyJFIFXDensity;

//纵向像素密度

const CFStringRef kCGImagePropertyJFIFYDensity;

//像素密度单元

const CFStringRef kCGImagePropertyJFIFDensityUnit;

//是否是高质量图像版本

const CFStringRef kCGImagePropertyJFIFIsProgressive;

kCGImagePropertyExifDictionary对应的字典中可能包含如下意义的键 :


//曝光时间

const CFStringRef kCGImagePropertyExifExposureTime;

//ExifNumber

const CFStringRef kCGImagePropertyExifFNumber;

//曝光程序

const CFStringRef kCGImagePropertyExifExposureProgram;

//每个通道的光谱灵敏度

const CFStringRef kCGImagePropertyExifSpectralSensitivity;

//ISO速度等级

const CFStringRef kCGImagePropertyExifISOSpeedRatings;

//ExifOECF

const CFStringRef kCGImagePropertyExifOECF;

//灵敏类型

const CFStringRef kCGImagePropertyExifSensitivityType;

//输出灵敏标准

const CFStringRef kCGImagePropertyExifStandardOutputSensitivity;

//推荐曝光指数

const CFStringRef kCGImagePropertyExifRecommendedExposureIndex;

//ISO速率

const CFStringRef kCGImagePropertyExifISOSpeed;

const CFStringRef kCGImagePropertyExifISOSpeedLatitudeyyy;

const CFStringRef kCGImagePropertyExifISOSpeedLatitudezzz;

//Exif版本

const CFStringRef kCGImagePropertyExifVersion;

//原始日期时间

const CFStringRef kCGImagePropertyExifDateTimeOriginal;

//数字化日期时间

const CFStringRef kCGImagePropertyExifDateTimeDigitized;

//压缩配置

const CFStringRef kCGImagePropertyExifComponentsConfiguration;

//压缩模式像素位

const CFStringRef kCGImagePropertyExifCompressedBitsPerPixel;

//快门速度值

const CFStringRef kCGImagePropertyExifShutterSpeedValue;

//孔径值

const CFStringRef kCGImagePropertyExifApertureValue;

//亮度值

const CFStringRef kCGImagePropertyExifBrightnessValue;

//曝光偏差值

const CFStringRef kCGImagePropertyExifExposureBiasValue;

//最大光圈值

const CFStringRef kCGImagePropertyExifMaxApertureValue;

//距离

const CFStringRef kCGImagePropertyExifSubjectDistance;

//测光模式

const CFStringRef kCGImagePropertyExifMeteringMode;

//光源

const CFStringRef kCGImagePropertyExifLightSource;

//拍摄时的闪光状态

const CFStringRef kCGImagePropertyExifFlash;

//焦距

const CFStringRef kCGImagePropertyExifFocalLength;

//主体区域

const CFStringRef kCGImagePropertyExifSubjectArea;

//相机制造商指定的信息

const CFStringRef kCGImagePropertyExifMakerNote;

//用户信息

const CFStringRef kCGImagePropertyExifUserComment;

//日期和时间标记的秒分数

const CFStringRef kCGImagePropertyExifSubsecTime;

//原始时间

const CFStringRef kCGImagePropertyExifSubsecTimeOriginal;

//数字时间

const CFStringRef kCGImagePropertyExifSubsecTimeDigitized;

//FlashPix版本信息

const CFStringRef kCGImagePropertyExifFlashPixVersion;

//色彩空间

const CFStringRef kCGImagePropertyExifColorSpace;

//X方向像素

const CFStringRef kCGImagePropertyExifPixelXDimension;

//Y方向像素

const CFStringRef kCGImagePropertyExifPixelYDimension;

//与图像相关的声音文件

const CFStringRef kCGImagePropertyExifRelatedSoundFile;

//FlashEnergy

const CFStringRef kCGImagePropertyExifFlashEnergy;

//FrequencyResponse

const CFStringRef kCGImagePropertyExifSpatialFrequencyResponse;

//像素数目

const CFStringRef kCGImagePropertyExifFocalPlaneXResolution;

const CFStringRef kCGImagePropertyExifFocalPlaneYResolution;

const CFStringRef kCGImagePropertyExifFocalPlaneResolutionUnit;

//图像主体的位置

const CFStringRef kCGImagePropertyExifSubjectLocation;

//选择的曝光指数

const CFStringRef kCGImagePropertyExifExposureIndex;

//传感器类型

const CFStringRef kCGImagePropertyExifSensingMethod;

//图像文件源

const CFStringRef kCGImagePropertyExifFileSource;

//场景类型

const CFStringRef kCGImagePropertyExifSceneType;

//CFA模块

const CFStringRef kCGImagePropertyExifCFAPattern;

//对图像数据进行特殊渲染

const CFStringRef kCGImagePropertyExifCustomRendered;

//曝光模式设置

const CFStringRef kCGImagePropertyExifExposureMode;

//白平衡模式

const CFStringRef kCGImagePropertyExifWhiteBalance;

//数字变焦比

const CFStringRef kCGImagePropertyExifDigitalZoomRatio;

//35毫米胶片的等效焦距

const CFStringRef kCGImagePropertyExifFocalLenIn35mmFilm;

//场景捕捉类型(标准,景观,肖像,夜晚)

const CFStringRef kCGImagePropertyExifSceneCaptureType;

//图像增益

const CFStringRef kCGImagePropertyExifGainControl;

//图像对比度

const CFStringRef kCGImagePropertyExifContrast;

//图像饱和度

const CFStringRef kCGImagePropertyExifSaturation;

//图像锐度

const CFStringRef kCGImagePropertyExifSharpness;

//拍摄条件

const CFStringRef kCGImagePropertyExifDeviceSettingDescription;

//主体距离

const CFStringRef kCGImagePropertyExifSubjectDistRange;

//图像的唯一标识

const CFStringRef kCGImagePropertyExifImageUniqueID;

//相机所有者

const CFStringRef kCGImagePropertyExifCameraOwnerName;

//相机序列号

const CFStringRef kCGImagePropertyExifBodySerialNumber;

//透镜规格信息

const CFStringRef kCGImagePropertyExifLensSpecification;

//透镜制造商名称

const CFStringRef kCGImagePropertyExifLensMake;

//透镜模式

const CFStringRef kCGImagePropertyExifLensModel;

//透镜序列号

const CFStringRef kCGImagePropertyExifLensSerialNumber;

//伽马设置

const CFStringRef kCGImagePropertyExifGamma;


上一篇:Android运行时异常“Binary XML file line # : Error inflating class”


下一篇:IDEA里运行代码时出现Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class错误的解决办法(图文详解)