//#version 3.7; //#version 3.8; // povray v37_vs_v38_ImageFileReadTests.pov -fn +kfi // The file name is v38grey16.png // OK v3.7 & v3.8 #declare Pig00 = pigment {image_map {"v38grey16.png"} } #if (frame_number=1) // OK v3.7 & v3.8 When the output file format/type is png. // (output can be off, -fn, and still be OK so long as // the file type is correct - which is perhaps confusing) #declare Pig01 = pigment {image_map {"v38grey16"} } #end #if (frame_number=2) // This Christoph fixed in v3.8. It doesn't work in v3.7 // without an explicit leading file type token. // Parse Error: Expected 'map file spec' #declare Str02 = "v38grey16.png"; #declare Pig02 =pigment {image_map {Str02} } #end #if (frame_number=3) // This Christoph fixed in v3.8 so long as the output // file type leads to the right extension - or you can set // the file type explicitly. // It doesn't work in v3.7 without an explcit file type. #declare Str03 = "v38grey16"; #declare Pig03 =pigment {image_map {Str03} } #end #if (frame_number=4) // If the image file name has no extension, v3.7 and v3.8 // will try read the file depending upon the output file // type. If this is different than the actual file type, // both v3.7 and v3.8 require the file type be specified // for the image read to work. Otherwise parsing fails. #declare Pig04 =pigment {image_map {"NoFileExtension"} } #end #if (frame_number=5) // For a string ID, v3.7 forces the file type without // trying to read the file as being in the ouput format. // v3.8 attempts to read the file as being in the // output format. If this not valid, the file type // is required in v3.8 for parsing to work. #declare Str05 = "NoFileExtension"; #declare Pig05 =pigment {image_map {Str05} } #end // So long as your file type and/or extension is set correctly, it // never hurts to specify it. Once in a while that might save you // should you have multiple file formats of an image and you really // want to use a particular format which is different than the // output file type. #error "OK. Stopping early at parse end"