- topng(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'noinfarctus'), cas, dic))
+ w, h = topng(join(caspath, dic), '{}/{}-{}'.format(join(OUT_DIR, 'noinfarctus'), cas, dic))
+
+ # search maximums
+ if wmax < w: wmax = w
+ if hmax < h: hmax = h
+
+ # search width minimum
+ if wmin is None: wmin = w
+ elif wmin > w: wmin = w
+
+ # search height minimum
+ if hmin is None: hmin = h
+ elif hmin > h: hmin = h
+
+ print('min-width, max-width:', (wmin, wmax))
+ print('min-height, max-height:', (hmin, hmax))