From be672f6122c3b058d311f5e8f20954597875b705 Mon Sep 17 00:00:00 2001 From: blob8108 Date: Sat, 5 Oct 2013 08:50:30 +0100 Subject: [PATCH] scratch14: Thumbnail save fix Fixes #13 --- kurt/scratch14/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kurt/scratch14/__init__.py b/kurt/scratch14/__init__.py index f15a194..4291806 100644 --- a/kurt/scratch14/__init__.py +++ b/kurt/scratch14/__init__.py @@ -149,12 +149,14 @@ def save(self, fp, project): self.stage = self.UserObject("ScratchStageMorph") # project info - thumbnail = self.save_image( - kurt.Costume("thumbnail", self.project.thumbnail)) + thumbnail = self.save_image(kurt.Costume("thumbnail", ( + self.project.thumbnail or kurt.Image.new((160, 120), (1, 1, 1)) + ))).form + self.info = { 'author': self.project.author, 'comment': self.project.notes.replace("\n", "\r"), - 'thumbnail': thumbnail.form if thumbnail else None, + 'thumbnail': thumbnail, 'history': '', 'language': 'en', 'os-version': '',