disabled loading of bmp files :(

This commit is contained in:
2003-02-09 12:47:43 +00:00
parent aaa47ced53
commit 0841582d0b
2 changed files with 5 additions and 3 deletions

View File

@@ -56,13 +56,13 @@
int IMB_ispic(char *name) int IMB_ispic(char *name)
{ {
struct stat st; struct stat st;
int fp, buf[16]; int fp, buf[10];
int ofs = 0; int ofs = 0;
if (ib_stat(name,&st) == -1) return(0); if (ib_stat(name,&st) == -1) return(0);
if (((st.st_mode) & S_IFMT) == S_IFREG){ if (((st.st_mode) & S_IFMT) == S_IFREG){
if ((fp = open(name,O_BINARY|O_RDONLY)) >= 0){ if ((fp = open(name,O_BINARY|O_RDONLY)) >= 0){
if (read(fp,buf,64)==64){ if (read(fp,buf,32)==32){
close(fp); close(fp);
if (buf[ofs] == CAT) ofs += 3; if (buf[ofs] == CAT) ofs += 3;
if (buf[ofs] == FORM){ if (buf[ofs] == FORM){
@@ -86,7 +86,9 @@ int IMB_ispic(char *name)
} }
if (imb_is_a_png(buf)) return(PNG); if (imb_is_a_png(buf)) return(PNG);
if (imb_is_a_targa(buf)) return(TGA); if (imb_is_a_targa(buf)) return(TGA);
/*
if (imb_is_a_bmp(buf)) return(BMP); if (imb_is_a_bmp(buf)) return(BMP);
*/
return(FALSE); return(FALSE);
} }
close(fp); close(fp);

View File

@@ -508,7 +508,7 @@ void test_flags_file(SpaceFile *sfile)
BLI_testextensie(file->relname, ".tga") || BLI_testextensie(file->relname, ".tga") ||
BLI_testextensie(file->relname, ".rgb") || BLI_testextensie(file->relname, ".rgb") ||
BLI_testextensie(file->relname, ".png") || BLI_testextensie(file->relname, ".png") ||
BLI_testextensie(file->relname, ".bmp") || /* BLI_testextensie(file->relname, ".bmp") || */
BLI_testextensie(file->relname, ".iff") || BLI_testextensie(file->relname, ".iff") ||
BLI_testextensie(file->relname, ".lbm") || BLI_testextensie(file->relname, ".lbm") ||
BLI_testextensie(file->relname, ".sgi")) { BLI_testextensie(file->relname, ".sgi")) {