首页 > 其他分享 >unsupported parameter combination 解决办法

unsupported parameter combination 解决办法

时间:2023-05-22 20:31:38浏览次数:54  
标签:CGBitmapContextCreate apple combination bits unsupported bitmapInfo CGBitmapInfo



colorSpace = CGColorSpaceCreateDeviceRGB();

//    CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst;

//    CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst;

    

    //error

    CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Little | kCGImageAlphaNone;




http://lists.apple.com/archives/carbon-dev/2007/Jun/msg00014.html

CGBitmapContextCreate: unsupported parameter combination: set CGBITMAP_CONTEXT_LOG_ERRORS environmental variable to see the details



I am trying to use CGBitmapContextCreate to create a context for a raw image, but I get this error message:

CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component colorspace; kCGImageAlphaFirst.

Here is how I create my color space

...

FContext := CGBitmapContextCreate(FBits, NewWidth, NewHeight, 8, Stride, FColorSpace, kCGImageAlphaFirst or kCGBitmapByteOrder32Little);

...

Any ideas about what is wrong? i looked at CGBitmapContextCreate's docs here, but they say that it supports 32-bits images with 8 bits per channel:


http://developer.apple.com/documentation/GraphicsImaging/Reference/ CGImage/Reference/reference.html#//apple_ref/doc/c_ref/CGBitmapInfo



That just lists possible values for CGBitmapInfo. You should check out <http://developer.apple.com/qa/qa2001/qa1037.html>. It lists the only legal combinations of bitsPerComponent, colorspace and bitmapInfo that CGBitmapContextCreate supports. It is a fairly limited set and any other combinations cause CGBitmapContextCreate to fail.



steve



_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


  • Follow-Ups:
  • From: "Felipe Monteiro de Carvalho" <email@hidden>

References:

 

 

>Re: Unsupported format for CGBitmapContextCreate


标签:CGBitmapContextCreate,apple,combination,bits,unsupported,bitmapInfo,CGBitmapInfo
From: https://blog.51cto.com/u_16124099/6326929

相关文章

  • Non-Default parameter follows default parameters
    错误解析:在设置参数的时候,不能把没有的默认的参放在有默认值的参数的后面解决措施:把没有默认数值的参数放在最前面,train放在num_users前面去def__init__(self,train,num_users,num_items,num_rate_levels,emb_dim=64):......
  • Parameter 9 of constructor in com.xxx.impl.xxxServiceImpl required a bean of ty
    1查看Service实现类是否加了@AllArgsConstructor2删除@AllArgsConstructor3给每个要注入的serviceBean加@Resource原因lombok的@AllArgsConstructor注解会代替@Autowired注入,导致某些不需要手动注入的bean重复加了@Autowired......
  • httprunner 4.x学习 - 10.参数化(parameters)引用外部 csv 数据文件 和函数
    前言httprunner4.x实现参数化使用parameters关键字,数据源有三种方式1.在yaml文件中直接写测试数据源2.测试数据源写到csv文件3.自定义函数,函数返回列表形式数据独立参数对于已有参数列表,并且数据量比较大的情况,比较适合的方式是将参数列表值存储在CSV数据文件中。......
  • httprunner 4.x学习 -9.parameters 参数化
    前言httprunner4.x实现参数化使用parameters关键字,数据源有三种方式1.在yaml文件中直接写测试数据源2.测试数据源写到csv文件3.自定义函数,函数返回列表形式数据参数配置参数名称的定义分为两种情况:独立参数单独进行定义;多个参数具有关联性的参数需要将其定义在一起......
  • jenkins配置动态拉取git分支代码。Git Parameter
    1.GitParameter需要安装GitParameter插件,安装后重启jenkins。   ......
  • MissingServletRequestParameterException: Required request parameter 'xxx' for me
    关于简单参数传递的一个异常先前情提要一下,在练习一个带分页的员工查询请求功能,接口文档描述如下其中页码跟记录数是必须参数,然后有个按姓名模糊查询,这个参数是可有可无的然后我最初写的代码长这样用@RequestParam注解来获取这个url中携带的简单参数然后测试页面的时候......
  • SQL Injector - POST Parameter Attack
    login.jsp如下:<%@pagelanguage="java"contentType="text/html;charset=UTF-8"pageEncoding="UTF-8"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.d......
  • MSSQL2K - SQL Injector - Query String Parameter Attack结合netcat获得反向cmdshell
    fasttrack操作:root@bt:~#cd/pentest/exploits/fasttrack/root@bt:/pentest/exploits/fasttrack#./fast-track.py-i******************************************************Performingdependencychecks...******************************************************......
  • MSSQL2K - SQL Injector - Query String Parameter Attack获得反向cmdshell
    上次没有成功获得cmdshell,因为fasttrack没有这方面的代码,这次编写了server.py。importsocketHOST=''PORT=4444s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)s.bind((HOST,PORT))s.listen(1)conn,addr=s.accept()cmd="\n"try:whileTrue:......
  • Exercises 1 in Statistical mechanics: entropy, order parameters, and complexity
    这里记录一下一些在《Statisticalmechanics:entropy,orderparameters,andcomplexity》这本书的第一章中的一些比较有趣的题目。Q1ThereareMdiceeachwithNsides(labeledbyintegers)andateachturneverydiceisthrownindependentlyoneafteranother,and......