Musings of a dad with too much time on his hands and not enough to do. Wait. Reverse that.

Tag: genealogy (Page 1 of 6)

Python help with slideshows

As in years past, I continue to work on my annual family video as a year-end project. As is my tradition, I always end my videos with a sort-of “outro” segment where I play a slideshow of family photos from the past year over some upbeat song.

The software I use, Cyberlink PowerDirector, has a nifty Slideshow Creator tool that makes it easy for you to drop your photos and music into one of several slick, pre-created templates for a cool slideshow. While this tool produces a neat product in a short amount of time, I’ve encountered a few problems with it:

  • Slide order is not guaranteed. I often want particular photos to start the slideshow and particular ones to end it but no matter how I name my images alphabetically, the Slideshow Creator never seems to order my slides how I want them.
  • I always have a challenge matching the number of images I want in my project to the length of the background music I want playing in the montage. Often, I have too many images for the length of song I’ve chosen and Slideshow Creator will repeat my song until it’s cycled through all my photos. I usually play a game of building my project with a certain amount of images and then trying to guess how many I need to delete to avoid Slideshow Creator repeating my song.

This year, I finally explored a second option: Theme Designer. It seems like Slideshow Creator is a layer of abstraction over Theme Designer, but PowerDirector allows you to bypass the Creator tool and work directly with the Designer. There’s less automation, but more control; however, my problems still remain: can I order my slides as I see fit and just how many photos can I use to cover the length of my chosen music?

The tutorial video is helpful and shows you that you have full control over the order of your images, but I still have the question about how many images I can include to fill the length of my chosen music. Here’s how I solved that problem.

Step 1: Measure the length of each template you want to use

PowerDirector Theme Designer

In this example, I’ll focus on the Picture Frames theme. This theme has five templates:

  1. An Opening template that holds two images
  2. A Middle 1 template that holds three images
  3. A Middle 2 template that holds four images
  4. A Middle 3 template that holds five images
  5. and a Closing template that holds four images

What is the runtime for these templates? You can check the runtime in the preview on the right by dragging the timer all the way to the end of the segment–for the Opening template, the preview says it runs for seven seconds–but I’ve not found this preview to be completely honest.

I’ve found I’ve had to add each template to a new project, add images to all the templates, then drag the timer to the end of each template before I was confident in the true length of each sequence. In the case of the Picture Frames theme, I’ve found the runtimes of each template to be (rounding down to the nearest second):

  • The Opening template runs for seven seconds
  • The Middle 1 template runs for six seconds
  • The Middle 2 template runs for ten seconds
  • The Middle 3 template runs for 16 seconds
  • and the Closing template runs for eight seconds

Step 2: Figure out your song length

You can easily figure out the length of the song for your slideshow by right-clicking on the file, clicking the Details tab, and finding the Length property.

Tom Petty’s Free Fallin’ is runs for 255 seconds

Step 3: Let Python tell you the templates you need and the number of images to use

So, I know that my slideshow should run for 255 seconds. I know I want to use the Opening template only once at the beginning of the slideshow and the Closing template only once at the end. That’s 15 seconds out of 255: so I have 240 seconds to fill with some amount of the Middle templates. How many? Here’s some simple code I wrote to figure that out:

song_len_seconds = 255  # free fallin
opening_template = (7, 2)  # nbr of seconds long, nbr of pictures in template (Picture Frames)
middle_template1 = (6, 3)
middle_template2 = (10, 4)
middle_template3 = (16, 5)
closing_template = (8, 4)

remaining_time = song_len_seconds - opening_template[0] - closing_template[0]

print('After subtracting the runtime of the opening and closing templates, remaining secs to fill with middle templates: {0}'. \
      format(remaining_time))
print('Number of middle template combos to add to project: {0}'. \
      format(remaining_time / (middle_template1[0] + middle_template2[0] + middle_template3[0])))

middle_factor = int(remaining_time / (middle_template1[0] + middle_template2[0] + middle_template3[0]))

print('Total seconds consumed by adding {0} middle template combos: {1}'. \
      format(middle_factor, middle_factor*middle_template1[0] + middle_factor*middle_template2[0] + middle_factor*middle_template3[0]))

print('Remaining seconds to fill: {0}'. \
      format(remaining_time - (middle_factor*middle_template1[0] + middle_factor*middle_template2[0] + middle_factor*middle_template3[0])))

total_pics = opening_template[1] + closing_template[1] + \
    middle_factor*(middle_template1[1] + middle_template2[1] + middle_template3[1])

print('Number of pictures I\'ll need: {0}'.format(total_pics))

For simplicity, I just opted to use all three Middle templates in the same order: Middle 1, Middle 2, then Middle 3. By my calculations, after subtracting the Opening and Closing template runtimes, I will need to include seven Middle 1/Middle 2/Middle 3 combinations. Even after including seven of those combinations, I still have 16 additional seconds to fill–I didn’t write any code to recommend how to fill that time. I could fill it with one more Middle 3 template; of course, I’d want to make sure to place it in my project so that I don’t have two Middle 3 templates back-to-back.

My code also lets me know that an Opening, Closing, and seven Middle 1/Middle 2/Middle 3 combinations requires 90 images–which is nice for planning purposes.

Anyway, using some simple code like this will help me develop future slideshows more quickly and consistently.

Oh, the Places You’ll Go!

Looking for a gift for the graduate in your life? Dr. Seuss’s Oh, the Places You’ll Go could be just the ticket. The book is a fantastic pep talk for those preparing to make their marks on the world.

Want to take this gift to the next level? If you’re hosting or participating in a graduation party for your graduate, have all the party attendees sign the book and write an encouraging note or memory in it.

Want to take this gift to the supreme level? Plan ahead: I’m talking months and even years. Every year your child or loved one is in school, make arrangements to have his favorite teachers write notes in the book–on whatever page they choose–and ask that they date their notes, as well. And don’t restrict yourself to just teachers, either: anyone who’s had a positive influence on your child should be included.

If you start this work early enough, you’ll have an amazing and heart-felt gift for your loved one at their graduation, especially if it’s many years away.

Scanning Family Scrapbooks

Old photos remounted on photo-safe paper

So far in my family genealogical endeavors, I’ve scanned over 3500 photos, including old ones on tin. Most of the photos I’ve scanned have been loose in shoe boxes and the like, but sometimes I run across an old scrapbook.

From my research, these scrapbooks usually are not the best way to preserve the photos they contain, so here are some steps I follow to better protect those images.

Take pictures of the original book

Before I start removing pictures from the original scrapbook, I’ll take pictures of it, cover-to-cover, page-by-page. For one, it’s nice to simply have a record of how the images were originally stored and ordered. Furthermore, once you start removing each photo, it may be helpful to have a reminder of what page each image came from and what other images surrounded it.

Take care removing the photos

Removing your photos might be tricky, depending on how they were mounted to the original scrapbook. I have found a standard business card a helpful tool in the effort where I slide it beneath an open edge and very carefully use it to pry the picture free. Check with the Internet, too, as you may find other helpful advice.

Scan and document each photo

In the past, I’ve discussed how I scan and document family slides. With photos, my approach is much the same:

File format? I’ve toyed with preserving my images as PNG or even TIF, but I predominantly stick to JPG, more for concern about disk space than anything else.

Naming convention? Long ago, I devised a naming convention that includes a person’s name along with a number in case I have multiple pictures of the same individual. For example, the file smith, john4.jpg would indicate the fourth picture I have of John Smith. This formula gets more complicated when there is more than one individual in a picture, which may make for a decent future blog post.

Documentation? For better or worse, I’m still quite “old school” when it comes to documenting my images, authoring something akin to a “read me” file in the folders where I store my files–I’ve talked a little about that approach in two previous posts. Long ago, I recall Leo Laporte recommending the book Digital Asset Management for Photographers for tips on photo storage and organization. That may be worth checking out as well as this old podcast episode.

Regardless, when documenting photos, I try my best to answer the Five Ws. If you’re lucky, your ancestor may have had the forethought to write some of those answers on the back of the photo (which is another reason to be able to gently remove the images from the original pages).

Remount the photos in a photo-safe scrapbook

Once you’ve scanned and documented your photos, you could pack them away in a photo-safe container. However, how about sharing them with the rest of your family in a photo-safe scrapbook?

I buy acid-free cardstock paper on which I mount the photos, slide them into clear, acid-free sleeves with holes for a three ring binder, and snap the pages into a nice, three ring binder. To mount the pictures to the paper, I use self-adhesive photo corner stickers.

Before I start mounting images to paper, I try to do a little planning. It may make sense to mount the pictures in the same order as they were in the original book. However, it might make more sense to group pictures by person–if you have several pictures of Aunt Sally, it might make sense to group all those together on a page or two labeled “Aunt Sally”. It might make sense to group pictures by event–if you have multiple pictures of a Christmas in 1955, it might make sense to keep them together on a page called “Christmas 1955”.

While the self-adhesive photo corners do make it much easier to remove your pictures and look on the back for any notes, I try to add labels of any important information below each photo, so that it shouldn’t be necessary to pull out a given picture just to see what may be written on the back. You can check out the picture I took of one of my scrapbook pages (above) for details. One change I’ve made since I put that page together, though, is that I now use an easier-to-read font like Arial for my labels.

Include your pictures of the original scrapbook

Remember how I recommended taking a picture of the original scrapbook? I like to include copies of those pictures in a page or two of the new version, especially if the original had a neat look to it. You may not want to include every picture: maybe just the covers and an example page.

Include a cover page

Finally, it may be helpful to include a printed cover page in the new scrapbook describing how you migrated the photos from the original scrapbook to the new, safer version. Include the date(s) you did the work and your own contact information, so family knows who did this great work and who has electronic copies of the images.

Good idea for those loose pictures, too

While it might not be feasible to make scrapbooks for all your loose photos, your family might be well served by mounting many of your loose pictures in photo-safe scrapbooks, too.

So, how are you dealing with your old scrapbooks and loose photos? I’d love you hear your thoughts and suggestions!

« Older posts

© 2024 DadOverflow.com

Theme by Anders NorenUp ↑