Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa 将图像数据转换为原始位图_Cocoa_Image_Bitmap - Fatal编程技术网

Cocoa 将图像数据转换为原始位图

Cocoa 将图像数据转换为原始位图,cocoa,image,bitmap,Cocoa,Image,Bitmap,在我的应用程序中,我需要将原始字节数据(NSData对象)转换为原始位图。系统应使用尽可能多的格式(32位JPG/Tiff,但也包括24位Tiff等)。到目前为止,我正在创建NSData的NSImage并将其转换为CGImageRef。然后我使用CGCreateImageContext读取原始位图数据,但是,CGCreateImageContext支持的格式非常有限(例如,不支持24位TIFF)。没有CGImageContextCreate的帮助,还有其他方法读取图像的实际位图吗

在我的应用程序中,我需要将原始字节数据(NSData对象)转换为原始位图。系统应使用尽可能多的格式(32位JPG/Tiff,但也包括24位Tiff等)。到目前为止,我正在创建NSData的NSImage并将其转换为CGImageRef。然后我使用CGCreateImageContext读取原始位图数据,但是,CGCreateImageContext支持的格式非常有限(例如,不支持24位TIFF)。没有CGImageContextCreate的帮助,还有其他方法读取图像的实际位图吗