return 1 var

This commit is contained in:
Nutbuster 2021-07-17 13:32:30 +10:00
parent d6824c5111
commit dc4b133c79
1 changed files with 3 additions and 5 deletions

View File

@ -22,8 +22,8 @@ init python:
# (cg: string; ext: string; w: float; h: float
def cg(fname, ext, w, h):
wh = {'x': w, 'y': h}
scaleFactor = box_ratio(wh)
return im.FactorScale(fname, scaleFactor["x"], scaleFactor["y"], False)
scale = box_ratio(wh)
return im.FactorScale(fname, scale, scale, False)
# Reads /images/cgs dir for all image files
# Populates g:Gallery and galleryItems
@ -60,9 +60,7 @@ init python:
cent = PREFERRED_HEIGHT * 100.0 / float(xy['y'])
cent /= 100.0
xy['x'] = cent
xy['y'] = cent
return xy
return cent
# Call to loading the gallery
loadGallery()