Exemplo n.º 1
0
def GenerateHDRs(config, directory):

    symlink = CompositeImage.SymlinkGenerator()

    ProcessFolder(symlink, config, directory)

    image_ext = config.GetImageExt()
    if image_ext == '.tiff':
        generator = CompositeImage.RawToTifGenerator
    if image_ext == '.thumb.jpg':
        generator = CompositeImage.RawToThumbnailGenerator

    ProcessFolder(generator, config, directory)

    hdr_gen = CompositeImage.HDRGenerator()
    ProcessFolder(hdr_gen, config, directory)
Exemplo n.º 2
0
import CompositeImage as CI
import glob

HDRworkdir = '/home/smb/HDR'

HDRCollector = CI.CollectHDRStrategy()

fl = glob.glob(
    '/home/smb/git/fotoworkflow/Python toolok/src/test_images/*.CR2')
hdrs, sic = HDRCollector.parseFileList(fl)

symlink_gen = CI.SymlinkGenerator()
symlink_gen.setTargetDir(HDRworkdir)
for hdr in hdrs:
    symlink_gen(hdr.getCompImage())

hdr_gen = CI.HDRGenerator()
hdr_gen.setParams(HDRworkdir, '.tiff', 'test')

#for i, hdr in enumerate(hdrs):
#    hdr_gen._prefix = 'test_%d' % i
#    hdr_gen(hdr.getCompImage())

hdr_gen(hdrs[0].getCompImage())
Exemplo n.º 3
0
 def onCreateSymlink(self,evt):
     self.expander.executeGen(CompositeImage.SymlinkGenerator())
Exemplo n.º 4
0
 def onSymlinks(self, evt):    
     self.ExecCmd(CompositeImage.SymlinkGenerator())
Exemplo n.º 5
0
 def _runSymlinkGen(self, tdir):
     symlinkgen = CompositeImage.SymlinkGenerator()
     hdr_config = CompositeImage.HDRConfig(tdir)
     symlinkgen(self.CI, hdr_config)
Exemplo n.º 6
0
    ProcessFolder(generator, config, directory)

    hdr_gen = CompositeImage.HDRGenerator()
    ProcessFolder(hdr_gen, config, directory)


config_parser = setup_config_parser()
(config, pos_args) = config_parser.parse_args()

outdir, indir = process_dirs(config_parser, pos_args)

seq_parser_config, seq_generator = process_seq_type(config_parser, config,
                                                    outdir)

if config.generate:
    cmd = seq_generator
    if config.use_tiff:
        seq_parser_config.SetImageExt('.tiff')
    else:
        seq_parser_config.SetImageExt('.thumb.jpg')

else:
    cmd = CompositeImage.SymlinkGenerator()

if config.recursive:
    for (p, d, f) in os.walk(indir):
        print "Processing %s" % p
        ProcessFolder(cmd, seq_parser_config, p)
else:
    ProcessFolder(cmd, seq_parser_config, indir)