首先要弄清楚图片格式的编码方式,然后设置分辨率,可以显示出来。
void far getimage(int left,int top,int right,int bottom,void far *buf)
说明:把屏幕图形部分拷贝到由BUF所指向的内在区域,左上角和右下角图标。用函数IMAGESIZE()来确定存储图像所需字节数。用GETIMAGE()存储的图像可以用PUTIMAGTE()函数写到屏幕上。
#include<stdio.h>main()
{
char *ptr, filename[50]/*定义变量及数组为字符型*/
printf("please input the file name you want to search:\n")
scanf("%s", filename)/*输入要查找的文件名*/
if ((ptr = searchpath(filename)) != NULL)
printf("the path is:%s\n", ptr)/*将文件所在的路径输出*/
else
printf("cannot find")/*若文件未找到,输出双引号内提示信息*/
}