Skip to content

Commit 657e881

Browse files
committed
adding a new magic number for JPG compatibility
-an artist was using a JPG image from internet. -trying to publish it from Jabuka, it was failing. -IECore.Reader.create using IECore.JPGImageReader.canRead was assuming the file couldn't be read. -the magic number test was returning false because we wasn't using this specific magic number value. -Hence, I add this new magic value. -I runned the test fine.
1 parent cf4f98c commit 657e881

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IECore/JPEGImageReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ bool JPEGImageReader::canRead( const string &fileName )
9595
in.seekg(0, ios_base::beg);
9696
in.read((char *) &magic, sizeof(unsigned int));
9797

98-
return magic == 0xe0ffd8ff || magic == 0xffd8ffe0 || magic == 0xe1ffd8ff || magic == 0xffd8ffe1 ;
98+
return magic == 0xe0ffd8ff || magic == 0xffd8ffe0 || magic == 0xe1ffd8ff || magic == 0xffd8ffe1 || magic == 0xdbffd8ff;
9999
}
100100

101101
void JPEGImageReader::channelNames( vector<string> &names )

0 commit comments

Comments
 (0)