diff --git a/logos/collage_four_square_logo.png b/logos/collage_four_square_logo.png index d1cdf9ac..7225cebb 100755 Binary files a/logos/collage_four_square_logo.png and b/logos/collage_four_square_logo.png differ diff --git a/logos/collage_nine_square.png.png b/logos/collage_nine_square.png.png deleted file mode 100755 index 68fed67c..00000000 Binary files a/logos/collage_nine_square.png.png and /dev/null differ diff --git a/logos/collage_nine_square_logo.png b/logos/collage_nine_square_logo.png deleted file mode 100755 index 7a6eaa80..00000000 Binary files a/logos/collage_nine_square_logo.png and /dev/null differ diff --git a/logos/single_square_logo.png b/logos/single_square_logo.png new file mode 100644 index 00000000..6f69096f Binary files /dev/null and b/logos/single_square_logo.png differ diff --git a/scripts/configuration.py b/scripts/configuration.py index e72df189..f3e141bb 100755 --- a/scripts/configuration.py +++ b/scripts/configuration.py @@ -7,7 +7,7 @@ class Configuration(): # default values user_name = None logo_file = None - countdown1 = 5 # seconds of preview before first snap + countdown1 = 10 # seconds of preview before first snap countdown2 = 3 # seconds of preview between snaps (Four pictures mode) photoCaption = "" # Caption in the photo album ARCHIVE = True # Do we archive photos locally diff --git a/scripts/constants.py b/scripts/constants.py index 597f2dc7..32a26be3 100755 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -36,12 +36,11 @@ # Animation : animated gif EFFECTS_PARAMETERS = { "None": { - 'snap_size' : (1640,1232), #(width, height) => preferably use integer division of camera resolution - 'logo_size' : 128, # height in pixels of the logo (will be thumbnailed to this size) - 'logo_padding' : 32 # bottom and right padding of the logo (pixels) + 'snap_size' : (3280,2464), #(width, height) => preferably use integer division of camera resolution + 'foreground_image' : "../logos/single_square_logo.png" }, "Four": { - 'snap_size' : (820,616), #(width, height) of each shots of the 2x2 collage + 'snap_size' : (3280,2464), #(width, height) of each shots of the 2x2 collage 'foreground_image' : "../logos/collage_four_square_logo.png" # Overlay image on top of the collage }, "Nine": { @@ -62,17 +61,17 @@ "icon" : os.path.join("ressources","ic_four.png"), "order":1 }, - "Nine": { - "icon" : os.path.join("ressources","ic_nine.png"), - "order":2 - }, + # "Nine": { + # "icon" : os.path.join("ressources","ic_nine.png"), + # "order":2 + # }, "None": { "icon" : os.path.join("ressources","ic_portrait.png"), "order":0 - }, - "Animation": { - "icon" : os.path.join("ressources","ic_anim.png"), - "order":3 + # }, + # "Animation": { + # "icon" : os.path.join("ressources","ic_anim.png"), + # "order":3 } } @@ -201,6 +200,11 @@ os.path.join("ressources","count_down_3.png"), os.path.join("ressources","count_down_4.png"), os.path.join("ressources","count_down_5.png"), + os.path.join("ressources","count_down_6.png"), + os.path.join("ressources","count_down_7.png"), + os.path.join("ressources","count_down_8.png"), + os.path.join("ressources","count_down_9.png"), + os.path.join("ressources","count_down_10.png"), os.path.join("ressources","count_down_ready.png")] # this defines the height ratio of the countdown images wrt. the preview size COUNTDOWN_IMAGE_MAX_HEIGHT_RATIO = 0.2 #[0. - 1.] range diff --git a/scripts/ressources/count_down_10.png b/scripts/ressources/count_down_10.png new file mode 100644 index 00000000..fbd00814 Binary files /dev/null and b/scripts/ressources/count_down_10.png differ diff --git a/scripts/ressources/count_down_6.png b/scripts/ressources/count_down_6.png new file mode 100644 index 00000000..98f99b5b Binary files /dev/null and b/scripts/ressources/count_down_6.png differ diff --git a/scripts/ressources/count_down_7.png b/scripts/ressources/count_down_7.png new file mode 100644 index 00000000..e82796fe Binary files /dev/null and b/scripts/ressources/count_down_7.png differ diff --git a/scripts/ressources/count_down_8.png b/scripts/ressources/count_down_8.png new file mode 100644 index 00000000..2bf26e61 Binary files /dev/null and b/scripts/ressources/count_down_8.png differ diff --git a/scripts/ressources/count_down_9.png b/scripts/ressources/count_down_9.png new file mode 100644 index 00000000..a78c138b Binary files /dev/null and b/scripts/ressources/count_down_9.png differ diff --git a/scripts/user_interface.py b/scripts/user_interface.py index b6d6b714..7e4e1327 100755 --- a/scripts/user_interface.py +++ b/scripts/user_interface.py @@ -489,6 +489,23 @@ def snap(self,mode="None"): snapshot.paste(config.logo,(xoff, yoff), config.logo) except Exception as e: self.log.warning("Could not add logo to image : %r"%e) + #paste the collage enveloppe if it exists + try: + self.log.debug("snap: Adding the collage cover") + size = snapshot.size + front = Image.open(EFFECTS_PARAMETERS[mode]['foreground_image']) + front = front.resize((size[0],size[1])) + front = front.convert('RGBA') + snapshot = snapshot.convert('RGBA') + #print snapshot + #print front + snapshot=Image.alpha_composite(snapshot,front) + + except Exception, e: + self.log.error("snap: unable to paste collage cover: %s"%repr(e)) + + self.status("") + snapshot = snapshot.convert('RGB') self.log.debug("snap: saving snapshot") snap_filename = 'snapshot.jpg' snapshot.save(snap_filename)