forked from Cavemanon/SnootGame
Mario bros
This commit is contained in:
@@ -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:
|
init python:
|
||||||
|
|
||||||
# CONST PARAMS
|
# CONST PARAMS
|
||||||
|
Reference in New Issue
Block a user