| 97 | }; |
| 98 | |
| 99 | static bool isExrImage(istream& iStream) { |
| 100 | // Taken from http://www.openexr.com/ReadingAndWritingImageFiles.pdf |
| 101 | char b[4]; |
| 102 | iStream.read(b, sizeof(b)); |
| 103 | |
| 104 | bool result = !!iStream && iStream.gcount() == sizeof(b) && b[0] == 0x76 && b[1] == 0x2f && b[2] == 0x31 && b[3] == 0x01; |
| 105 | |
| 106 | iStream.clear(); |
| 107 | iStream.seekg(0); |
| 108 | return result; |
| 109 | } |
| 110 | |
| 111 | AttributeNode createVec2fNode(string_view name, Imath::V2f value) { |
| 112 | AttributeNode node; |