当前位置: 首页 > news >正文

网站后台显示不全荣耀手机商城官方网站

网站后台显示不全,荣耀手机商城官方网站,外贸公司网站素材,专业定制网站开发公司最近使用QImage的函数setAlphaChannel时遇到了一个坑#xff0c;花了不少时间才弄清楚#xff1a;在使用这个函数后#xff0c;图像格式都会变成QImage::Format_ARGB32_Premultiplied。 先看下setAlphaChannel在帮助文档的说明#xff1a; void QImage::setAlphaChannel(…        最近使用QImage的函数setAlphaChannel时遇到了一个坑花了不少时间才弄清楚在使用这个函数后图像格式都会变成QImage::Format_ARGB32_Premultiplied。 先看下setAlphaChannel在帮助文档的说明 void QImage::setAlphaChannel(const QImage alphaChannel) Sets the alpha channel of this image to the given alphaChannel. If alphaChannel is an 8 bit alpha image, the alpha values are used directly. Otherwise, alphaChannel is converted to 8 bit grayscale and the intensity of the pixel values is used. If the image already has an alpha channel, the existing alpha channel is multiplied with the new one. If the image doesnt have an alpha channel it will be converted to a format that does. The operation is similar to painting alphaChannel as an alpha image over this image using QPainter::CompositionMode_DestinationIn. 大概意思 setAlphaChannel函数为图像指定透明通道如果alphaChannel是单通道的8位图片那么直接使用如果不是就转换成8位的灰度图片在作为透明通道。 如果图像已经有透明通道那么两个通道会相乘如果图像没有透明通道则会将图像转换成有透明通道的格式。 帮助文档只说了如果图像没有透明通道那么会将图像转化成有透明通道的图像但在使用过程中会发现只要使用了setAlphaChannel图像都会将格式转化成 QImage::Format_ARGB32_Premultiplied格式。 测试如下 void MainWindow::on_pushButton_clicked() {QImage src1(100,100,QImage::Format_RGB32);QImage src2(100,100,QImage::Format_RGB16);QImage src3(100,100,QImage::Format_ARGB32);QImage alpha(100,100,QImage::Format_Grayscale8);alpha.fill(Qt::white);src1.setAlphaChannel(alpha);src2.setAlphaChannel(alpha);src3.setAlphaChannel(alpha);qDebug()(src1.format() QImage::Format_ARGB32_Premultiplied);qDebug()(src2.format() QImage::Format_ARGB32_Premultiplied);qDebug()(src3.format() QImage::Format_ARGB32_Premultiplied); } 打印出的结果都是true也就是图像格式都转换成了QImage::Format_ARGB32_Premultiplied。
http://www.zqtcl.cn/news/327746/

相关文章:

  • 网站首页样式百度推广是什么工作
  • 广告手机网站制作阿里云域名 设置网站
  • 杭州市拱墅区网站建设ui培训有用么
  • 广东手机网站建设多少钱邯郸市做网站的公司
  • seo网站优化推广怎么做龙岗中心医院
  • 建网站程序智能网站建设平台
  • 建筑公司分几级资质seo入门培训
  • wap类网站上海网站建设免费推
  • 网站建设哪家好公司建设银行网站怎么登陆不
  • 关于建设网站的需求wordpress不能发布文章
  • 如何一键建淘宝客网站中国建设银行金华分行网站
  • 给wordpress添加公告英语seo
  • 佛山市网站建设系统wap浏览器网页版
  • 关于小说网站的一些建设流程学做蛋糕有哪些网站
  • 益阳购物网站开发设计禹城网站制作
  • 教育网站开发文档全网营销推广案例
  • 最流行的网站开发框架wordpress阅读权限
  • 怎么做推广网站创立网站
  • 制作自己的网站需要什么材料网站计费系统怎么做
  • 网站和域名的区别昆山网站开发建设公司
  • 兼职网站推广如何做西安市商标局
  • 打开网站说建设中是什么问题莱芜金点子招小时工
  • 做网站的相关协议秦皇岛解封最新消息今天
  • 网站托管维护方案新闻媒体发稿平台
  • 网站扩展名四平网站建设怎么选
  • 网站制作价格与售后视频网站建设有什么意义
  • 网站建设+太原1核1g可以做几个网站
  • 电商设计网站有哪些内容西安百度推广外包
  • 深圳网站建设价格多少做废旧金属的网站
  • wordpress 文档超级优化空间