讲一些您所需要隐藏的一些压缩文件变成图片形式保存(图片的大小为你的压缩包大小加上图片大小)!
请将需要合成的压缩包和图片放置与Debug同一目录下。
具体如何使用vs2017编译C语言,请百度。
#include<stdio.h>
#include<stdlib.h>
void main()
{
FILE *f_pic, *f_file, *f_finish;
printf("请输入需要合成的图片和文件的名称...\n");
char pic_name[100], file_name[100], finish_name[100];
char ch;
printf("图片:");
scanf("%s", pic_name);
printf("文件:");
scanf("%s", file_name);
printf("生成为图片的名称:");
scanf("%s", finish_name);
if (!(f_pic=fopen(pic_name,"rb")))//图片指针
{
printf("Cannot open the Picture%s!\n",pic_name);
return ;
}
if (!(f_file=fopen(file_name,"rb")))//文件指针
{
printf("Cannot open the File%s!\n", file_name);
return ;
}
if (!(f_finish =fopen(finish_name,"wb")))//合成文件指针
{
printf("Cannot creat the File%s!\n", finish_name);
return ;
}
while (!(feof(f_pic)))
{
ch = fgetc(f_pic);
fputc(ch,f_finish);
}
printf("图片读取完毕!\n");
fclose(f_pic);
while (!(feof(f_file)))
{
ch = fgetc(f_file);
fputc(ch, f_finish);
}
printf("文件合成完毕!\n");
fclose(f_file);
fclose(f_finish);
system("pause");
}