• paip.c++ qt 图片处理 检测损坏的图片


    paip.c++ qt 图片处理 检测损坏的图片




    作者Attilax ,  EMAIL:1466519819@qq.com 
    来源:attilax的专栏
    地址:http://blog.csdn.net/attilax


    #include <QMessageBox>
    #include <QFileDialog>
    #include "helo.h"


    //#include <qfile.h>
    //#include <qdir.h>
    //#include <qfileinfo.h>
    //#include<qdiriterator.h>
     #include <QtCore>
    //#include <QFileInfoListIterator>
    //#include "qfileinfo.h"
    //#include <QDirIterator>
    //#include <attilaxc9>
    //#include <QDirIterator>
    #include <qtextstream.h>
    void MainWindow::processImg(QString filename)
    {
    QString imgpath=filename;
        QImage image;
             image.load(imgpath);//fileName为图片的路径


             int imgwidth=image.width();
             QString imgwidth_str = QString::number(imgwidth, 10);
              QString imghit_str =QString::number(image.height(), 10);
              if(imgwidth==0&&image.height()==0 )
                  output2log("c:\\picbrokAll.txt",filename);




    }




    //检测


          QColor c = image.pixel(3,11);//第1行第11列的像素
          //  int* redpix,green,blue,alfa;
      // Qrgb qrgbc9=     c.rgb();
    //c.getRgb(redpix,green,blue,alfa);
     QString pixRed_str =QString::number(c.red() , 10);
  • 相关阅读:
    课堂例子验证
    大道至简第三章读后感
    动手动脑例子验证
    各数相加的思路、流程图、源代码及实现截图
    大道至简第二章读后感
    《大道至简》第一章读后感
    个人冲刺08
    个人冲刺07
    构建之法读后感04
    个人冲刺06
  • 原文地址:https://www.cnblogs.com/attilax/p/15199550.html
Copyright © 2020-2023  润新知