#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;
}
本文转自gnuhpc博客园博客,原文链接:http://www.cnblogs.com/gnuhpc/archive/2012/10/07/2713964.html,如需转载请自行联系原作者