From b7af2d7ec02cb21cee6c88a51e6d3899088e42bc Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 3 Jan 2002 03:57:27 +0000 Subject: [PATCH] make screenshots write jpegs by default --- direct/src/showbase/ShowBase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index fc3b5827df..33a9c51afb 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -43,6 +43,7 @@ class ShowBase: self.wantSfx = self.config.GetBool('audio-sfx-active', 1) self.wantMusic = self.config.GetBool('audio-music-active', 1) self.wantFog = self.config.GetBool('want-fog', 1) + self.screenshotExtension = self.config.GetString('screenshot-extension', 'jpg') if not (self.wantSfx or self.wantMusic): self.wantAnySound = None if not self.wantAnySound: @@ -663,7 +664,7 @@ class ShowBase: # Replace spaces with dashes because unix does not like spaces in the filename date = date.replace(' ', '-') date = date.replace(':', '-') - imageName = (namePrefix + '-' + date + '-' + str(frameCount) + '.bmp') + imageName = ('%s-%s-%d.%s' % (namePrefix, date, frameCount, self.screenshotExtension)) self.notify.info("Taking screenshot: " + imageName) takeSnapshot(self.win, imageName)