def load_hdr_image(objects, args): fname = args img = load_image(fname) if img is None: raise ValueError("Could not load %s image." % fname) if not isinstance(img, ImagePRGBA): raise ValueError("Loaded %s image is not hdr image!" % fname) objects[str(id(img))] = img return str(id(img))
from imldr import load_image, save_image #img = load_image('E:/hdr_images/Desk_oBA2.hdr') # print(img) # # img = load_image('E:/hdr_images/Apartment_float_o15C.hdr') # # print(img) #img = load_image('E:/hdr_images/AtriumNight_oA9D.hdr') # print(img) # img = load_image('C:/Users/Public/Pictures/Sample Pictures/Koala.jpg') # print(img) img = load_image('C:/Users/Public/Pictures/Sample Pictures/Koala.jpg') print(img) save_image('Koala.png', img) #save_image('Koala.exr', img)
from sdl import ImagePRGBA from imldr import load_image from hdr import Tmo tm = Tmo() tm.load('exp') in_img = load_image('E:/hdr_images/Desk_oBA2.hdr') w, h = in_img.size() out_img = ImagePRGBA(w, h) tm.tmo(in_img, out_img)