zoukankan      html  css  js  c++  java
  • 关于8位BMP图象的转置

     int lImageWidth,lImageHeight,lImageBitCount;

     BYTE* pImageBuff=NULL;

     pImageBuff=。。。BuffAddr();  

    lImageWidth=。。。Width();

     lImageHeight= 。。。Height();  

    int outWidth=lImageHeight;

     int outHeight=lImageWidth;

     lImageBitCount= 8; 

     int nLineWidth=(outWidth+3)/4*4;//凑成大于等于nColumn的最小的4 的整数倍。

     int size=iImageHeight*nLineWidth;

     BYTE* tempPixel=new BYTE[size];  

    memset(tempPixel,0,size);

     BYTE* copyPixel=NULL;

     BYTE* objPixel=NULL;  

    int x=0;

     int y=0;  

    int tempJ=0;

     for (UINT j=0;j<outHeight;j++)

     {  

     x=j;

      tempJ=j*nLineWidth;

      for (UINT i=0;i<outWidth;i++)

      {   

    // y=i;   

    //copyPixel=pImageBuff+y*outHeight+x;

       //objPixel=tempPixel+tempJ+i;  

      //memcpy(objPixel,copyPixel,1);    

       *(tempPixel+tempJ+i)=*(pImageBuff+i*outHeight+j);   

      }

     }

  • 相关阅读:
    commando VM安装
    Pocscan搭建详解
    Windows-RW-LinuxFS
    Festival
    ffmpeg-metadata
    FFmpeg-Screen-Recording
    ffmpeg-map
    ffmpeg-utils
    Linux-Fcitx5
    ffmpeg-volumedetect
  • 原文地址:https://www.cnblogs.com/lyjclsd/p/3601782.html
Copyright © 2011-2022 走看看