国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
錯誤Error>: CGBitmapContextCreate

錯誤Error>: CGBitmapContextCreate

: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 24 bits/pixel; 3-component color space; kCGImageAlphaNone; 363 bytes/row.

發(fā)表于:2013-01-21 17:3

這個(gè)問題我升級ios7的時(shí)候遇到,現(xiàn)已經(jīng)解決,修改cocos2dx底層

找到

static bool _initWithString(const char * pText, cocos2d::CCImage::ETextAlign eAlign, const char * pFontName, int nSize, tImageInfo* pInfo)

這個(gè)函數(shù)底下

做此修改

const int _width  = dim.width;

        const int _height = dim.height;

        

        unsigned char* data = new unsigned char[(int)(dim.width * dim.height * 4)];

        memset(data, 0, (int)(_width * _height * 4));

        

        // draw text

        CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();    

        CGContextRef context =

        CGBitmapContextCreate(data, _width, _height, 8, _width * 4, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);


道理很簡單,因?yàn)楦↑c(diǎn)數(shù) * 4以后再取整, 有可能不是4的倍數(shù)

然后顯示也正常了

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Caffe中卷積的實(shí)現(xiàn)細(xì)節(jié)(涉及到BaseConvolutionLayer、ConvolutionLayer、im2col等)
在OpenCV2.2中使用CvvImage類
vibe算法 c++實(shí)現(xiàn)
水印做法
const char *,char const *,char * const
在Visual C++ 6.0上實(shí)現(xiàn)矩陣的各種運(yùn)算
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服