subprocess.Popen
|
|
type(x)
|
_bound(x,
lower,
upper)
return the closest number to x that lies in [lower,upper] |
source code
|
|
optparse.OptionParser
|
get_parser()
get the argument parser object |
source code
|
|
|
check_parsed_options(options)
set (remaining) default values and check validity of various option
combinations |
source code
|
|
[[str,...],[str,...],[str,...]]
|
|
str
|
mktemp(ext='
' )
get temporary file name with optional extension |
source code
|
|
str
|
get_outfile(infile,
outdir,
base_prefix,
format,
hint=None)
get output file name taking into account output directory, format and
prefix, avoiding overwriting the input file |
source code
|
|
(int,int)
|
_IM_get_image_size(img,
args)
extract tuple(width,height) from image file using ImageMagick |
source code
|
|
float
|
_IM_get_image_luminance(img,
args,
geometry=None)
get average image luminance as a float in [0,255], using ImageMagick |
source code
|
|
[str,...]
|
_IM_entropy_args(alt=False)
IM entropy computation arguments, depending on default or alternate
algorithm |
source code
|
|
(int,int,int,int)
|
|
(int,int,int,int)
|
_manual_placement(size,
options,
r)
get rectangle of ratio r with user-defined placement
(N,S,W,E,NW,NE,SW,SE,center,random) |
source code
|
|
dict
|
get_cache(num_photos,
num_months)
returns a reference to the cache object, or None if caching is
disabled |
source code
|
|
|
compose_calendar(img,
outimg,
options,
callirhoe_args,
magick_args,
stats=None,
cache=None)
performs calendar composition on a photo image |
source code
|
|
[(int,int),...]
|
|
|
|
|
|
|
_prog_im = ' convert '
ImageMagick binary, either 'convert' or env var
CALLIRHOE_IM
|
|
_IM_lum_args = [ ' -colorspace ' , ' Lab ' , ' -channel ' , ' R ' , ' -separ ...
IM colorspace conversion arguments to extract image luminance
|
|
_IM_entropy_head = [ ' -scale ' , ' 262144@> ' ]
IM args for entropy computation: pre-scaling
|
|
_IM_entropy_alg = [ [ ' -define ' , ' convolve:scale=! ' , ' -define ' , ...
IM main/alternate entropy computation operator
|
|
_IM_entropy_tail = [ ' -colorspace ' , ' Lab ' , ' -channel ' , ' R ' , ' -s ...
IM entropy computation final colorspace
|
|
_cache = { }
cache input photo computed rectangle and luminance, key=filename,
value=(geometry,is_dark)
|
|
_mutex = threading.Lock()
mutex for cache access
|
|
__package__ = None
|