作者:gnuhpc
出处:http://www.cnblogs.com/gnuhpc/
#include "cv.h" #include "highgui.h" #include <stdio.h> int main(int argc,char ** argv) { IplImage *src; if (argc!=3) { printf("Conv:Image format convertion ,support JPG,BMP,TIF,PNG,PPM/n"); printf("Usage:conv srcImage dstImage/n"); return 0; } if ((src=/blog.armyourlife.info/cvLoadImage(argv[1],-1))!=0) { cvSaveImage(argv[2],src); cvReleaseImage(&src); printf("/n Convert successfully./n"); } else { printf("/n*** Read or Write Image fails. ***/n"); } return 0; }