快讯

在BMP文件中隐藏信息

2004-02-14 09:34  出处:PConline  作者:网上收集  责任编辑:zwg 

/* Colour depth increase if need be */ if (BMPsource- >bpp< 24) { printf("? Increasing Colour Depth to 16M colours (24bpp)..."); BMPworking=(BITMAP*)calloc(1,sizeof(BITMAP)); if (BMPworking==NULL) { printf("\n\nFATAL: Out of memory while increasing colour depth"); exit(4); } BMPworking- >palette=(HEAP*)calloc(1,sizeof(HEAP)); BMPworking- >raster=(HEAP*)calloc(1,sizeof(HEAP)); if (BMPworking- >palette==NULL || BMPworking- >raster==NULL) { printf("\n\nFATAL: Out of memory while increasing colour depth"); exit(4); } if (!initialiseHeap(BMPworking- >palette) || !initialiseHeap(BMPworking- >raster)) { printf("\n\nFATAL: Out of memory while increasing colour depth"); exit(4); } /* Do the promote to 24bpp */ promoteTo24(BMPsource, BMPworking); /* cleanup source */ removeHeap(BMPsource- >palette); removeHeap(BMPsource- >raster); free(BMPsource); BMPsource=NULL; printf("OK\n"); } else { /* Source was fine - > already 24 bpp */ BMPworking=BMPsource; BMPsource=NULL; } /* Prepare BS dataspace */ printf("? Analysing Data Patterns...."); filespace=(HEAP*)calloc(1,sizeof(HEAP)); initialiseHeap(filespace); switch (decodeData(BMPworking,filespace)) { case 0: printf("OK\n"); break; case 1: removeHeap(filespace); initialiseHeap(filespace); if (mode==2 || mode==4) { printf("ERROR\n\nFATAL: File does not contain any BlindSide hidden data\n"); exit(4); } printf("OK\n"); if (mode==1) { printf("? Creating New Archive...."); if (formatDataspace(BMPworking, filespace)) printf("OK\n"); else { printf("ERROR\n\nFATAL: There isn't enough space in the bitmap to hold any Blindside hidden data\n"); exit(4); } } break; case 2: printf("\nFATAL: Out of memory while analysing bitmap\n"); exit(4); break; case 3: printf("\nFATAL: Bitmap was encoded using a higher version of BlindSide than this one\n"); exit(4); break; }
键盘也能翻页,试试“← →”键
IT热词搜索 来源:360新闻
相关文章

相关软件:

腾讯QQ2012
大小:52.93 MB 授权:免费
腾讯QQ2012
立即下载
腾讯QQ2013
大小:49.32 MB 授权:免费
腾讯QQ2013
立即下载