您当前的位置: 首页 >  令狐掌门

QImage的深拷贝与浅拷贝

令狐掌门 发布时间:2020-11-05 23:39:49 ,浏览量:2

        最近在 做项目时,被QImage深深的坑过,之前也没遇到过,来看看如何构造一个QImage, 查看头文件可知,有如下几种构造方法:

    QImage() Q_DECL_NOEXCEPT;
    QImage(const QSize &size, Format format);
    QImage(int width, int height, Format format);
    QImage(uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
    QImage(const uchar *data, int width, int height, Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
    QImage(uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
    QImage(const uchar *data, int width, int height, int bytesPerLine, Format format, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);

        传入data, 图片的宽高,格式,等就可以构造一个QImage,

关注
打赏
1688896170
查看更多评论

令狐掌门

暂无认证

  • 2浏览

    0关注

    485博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.1110s