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

冒用公司名义做网站什么是sem

冒用公司名义做网站,什么是sem,新疆建设兵团医院网站,wordpress数据转移最近使用QImage的函数setAlphaChannel时遇到了一个坑,花了不少时间才弄清楚:在使用这个函数后,图像格式都会变成QImage::Format_ARGB32_Premultiplied。 先看下setAlphaChannel在帮助文档的说明: 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 doesn't 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.tj-hxxt.cn/news/125914.html

相关文章:

  • 安康优质网站建设方案百度推广效果怎么样
  • 石家庄推广网站百度竞价关键词质量度怎么提升
  • 中国建设银行网站北京网点数据网站有哪些
  • 专业做网站方案发布软文的平台有哪些
  • 网站设计佛山顺德百度seo公司兴田德润
  • 香河县住房和城乡建设局网站百度关键词自然排名优化公司
  • 部门网站建设宗旨东莞互联网推广
  • 郑州网站zhi zuo今天最新新闻国内大事件
  • 怎么提交网站收录热搜榜上2023年热搜
  • 电子商务中网站开发宁波seo外包推广软件
  • 做的网站手机打不开怎么回事图片识别搜索引擎
  • 商务网站开发开题报告千川推广官网
  • wordpress 关键词屏蔽seo综合查询中的具体内容有哪些
  • 如何增加网站权重做网上推广
  • 网站多域名百度网盘手机版
  • 互联网服务公司网站seo排名优化价格
  • 注册网站电子游戏送钱了38百度搜索网址
  • 商业性质网站建设步骤谷歌sem
  • 个人网站icp备案网网页首页设计图片
  • 做网站nicheseo课程总结
  • 公司做网站比较好的平台seo网站优化怎么做
  • 广州网站建设网站竞价网络推广外包
  • 民治做网站哪家便宜公司网站优化方案
  • 安徽元鼎建设工程网站百度股市行情上证指数
  • 平面设计网站推荐网推项目接单平台
  • 洞口做网站推荐怎么样建立自己的网站
  • 网站目录命名规则百度商业平台官网
  • 把excel做数据库分享成网站百度网络推广营销
  • 网站建设项目开发书百度应用
  • 做pc端网站特色常见的网络营销方法有哪些