odw/odwpycore — pull request #16 by Raistlin-odw (2013-07-02 04:32:05+00:00)
Title: Develop

add a new openEXR check lib for blank channel
the Imath and OpenEXR lib in script can be download from here:
http://www.excamera.com/sphinx/articles-openexr.html
package link is
http://excamera.com/files/OpenEXR-1.2.0.tar.gz
the doc link is
http://excamera.com/articles/26/doc/openexr.html

here is the example:

import OpenExrReader as oer
aa = oer.ExrCheck()
aa.setExr(r"bg_bad.exr") // set image path
aa.getChannel() //get channel name ,return a list like ['R','G','B','A']
aa.isChannelBlank('R') // return true if this channle is blank,False if this channle has data in it

//this is for a exr
def checkExr(fileName):
isPicEmpty = 1
image = OpenExrReader.ExrCheck().setExr(fileName)
for channel in ['R','G','B']:
if not image.isChannelBlank(channel):
isPicEmpty = 0
break
return isPicEmpty