Expected behavior is to loop through a list of image pathnames, crop square thumbnails out of them, and display them in a grid. In renpy 7.4 this worked. In renpy 8, *only the originally square images work*. For any rectangular image, a blank (or missing) thumb is produced. I find that strange.
Code: Select all
vpgrid:
for (i,img) in enumerate(pinups):
python:
(w,h) = get_image_size(img)
if w < h:
rect = (0, (h-w)//2, w, w) # integer division for py3
else:
rect = ((w-h)//2, 0, h, h)
# renpy 7.4: the trailing nultransform seems necessary to make At()
# return a Displayable (ATLTransform) rather than a Transform
# (can't say I really understand why).
# if img is not a Displayable, then 'brighten' doesn't work
img = At(img, \
Transform(crop=rect, size=(thumbsz,thumbsz)),
nultransform)
imagebutton:
xysize thumbsz,thumbsz
idle img #Fixed(img,Text("in progress", align=(0.95,0.05)))
hover At(img, brighten)
action [SetVariable("g_current_pz",('bonus',i+1)), Start()]