Check for 8bpp

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2541 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-05-09 19:50:16 +00:00
parent e857a8927b
commit 65806e3b4b
2 changed files with 42 additions and 14 deletions

View file

@ -917,8 +917,22 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
SCRIPT_MSG("CheckBitmap: \"%s\"\n",line.gettoken_str(1));
try {
init_res_editor();
if (update_bitmap(res_editor, IDB_BITMAP1, line.gettoken_str(1), 96, 16)) {
ERROR_MSG("Error: File doesn't exist, is an invalid bitmap, or has the wrong size\n");
int err = update_bitmap(res_editor, IDB_BITMAP1, line.gettoken_str(1), 96, 16, 8);
if (err) {
switch (err) {
case -1:
ERROR_MSG("Error: can't find bitmap\n");
break;
case -2:
ERROR_MSG("Error: invalid bitmap file - corrupted or not a bitmap\n");
break;
case -3:
ERROR_MSG("Error: bitmap isn't 96x16 in size\n");
break;
case -4:
ERROR_MSG("Error: bitmap has more than 8bpp\n");
break;
}
return PS_ERROR;
}
}