diff --git a/game/src/cg_gallery.rpy b/game/src/cg_gallery.rpy index 0667344..c693748 100644 --- a/game/src/cg_gallery.rpy +++ b/game/src/cg_gallery.rpy @@ -1,3 +1,18 @@ +label testo: + python: + import pygame + + # (src_image: FactorScale; name: string, ext: string) FactorScale refers to an image scaled down/up using im.FactorScale() + def save_thumb(src_image, name, ext): + savepath = config.basedir.replace("\\","/") + "/game/cache/" + if renpy.android: + savepath = os.environ['ANDROID_PUBLIC'] + "/cache/" + + data = src_image.load() #Returns a pygame surface + pygame.image.save(data, savepath+"thmb_"+name+ext) #Saves the image to file + + $save_thumb(NOT_UNLOCKED_COVER,"default",".jpg") + init python: # CONST PARAMS