[Bf-blender-cvs] [bff1707aaef] master: Cleanup: remove hard coded file format check in IMB_ispic_type

Campbell Barton noreply at git.blender.org
Tue Nov 10 02:00:18 CET 2020


Commit: bff1707aaef367822f4fbb38dbc2477b74e643a4
Author: Campbell Barton
Date:   Tue Nov 10 11:57:56 2020 +1100
Branches: master
https://developer.blender.org/rBbff1707aaef367822f4fbb38dbc2477b74e643a4

Cleanup: remove hard coded file format check in IMB_ispic_type

This is already being checked in the 'is_a' callback.

===================================================================

M	source/blender/imbuf/intern/util.c

===================================================================

diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 64b03f332a8..7be58a9ca14 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -152,11 +152,6 @@ int IMB_ispic_type(const char *name)
 
   close(fp);
 
-  /* XXX move this exception */
-  if ((BIG_LONG(((int *)buf)[0]) & 0xfffffff0) == 0xffd8ffe0) {
-    return IMB_FTYPE_JPG;
-  }
-
   for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) {
     if (type->is_a) {
       if (type->is_a(buf)) {



More information about the Bf-blender-cvs mailing list