Life Poster

Inspired by this article, but lacking a key ingredient (Macintosh), I decided to see if I could do something similar in Windows or Linux. With three pieces of software, I found I could do something similar (and better, I think), but you can do something essentially identical with just one.

Get Ready
First off, get Perl. For non-techies, this may seem daunting. “Oh dear. I need to learn a programming language to do this?” No, you don’t. But the script that does all the hard work is written in perl. If you have Linux, you likely already have Perl. For Windows users, get ActiveState’s ActivePerl.

Next, you’ll need ImageMagick. There are versions for Windows and Linux. If all you want to do is make a poster that has uniformly laid out pictures, similar to the one created on the Mac, you need read no further. ImageMagick’s montage program does it all by itself. (in fact, you don’t even need Perl if you are just going to use montage). An excellent tutorial on doing this sort of thing is here. If, however, your images are of varying sizes and orientations, you’ll need more.

One note: when installing ImageMagick, be sure you do this after installing ActivePerl. Also, when the install program asks you to “Select Additional Tasks”, be sure “Install PerlMagick for ActiveState Perl” is checked. This is essential and easily missed.

The final thing you’ll need is a script to do the work. I really like Picture Tile. I imagine it will work with Linux (I haven’t actually tried it yet). However, it requires a couple of very small modifications to work with Windows. You can get my Windows specific version here.

2003 Life Poster

Have Fun, Get Creative
Now that you have all the pieces, it is time to get creative. I decided I wanted to make a poster for each year that I have digital photos. So I made a new directory (I called it “2003 tile”) and copied all the really good photos to it.

Next, I had to decide how big a poster I wanted. The largest photos from places like Snapfish and Shutterfly are 20″x30″. I decided to go with a 24″x36″ size because that seems like a more likely poster frame size. I also found someone who will print these pretty darn cheaply. I have not yet had them print anything, but when I do, I’ll update this post.

So, now that I’ve decided to do this in 24″x36″, we need to convert that to pixels. Typically, 100 DPI is the barest of minimums for prints. I’ll go with 200 DPI. So I’ll want my final image to be 4800 x 7200.

Now, I needed to decide how much to scale my photos. I came up with about 50 shots, most around 1600×1200 pixels (from my 2MP camera). I started out with a guess of about 50%, and it is easy to play around with it.

Now we run the PictureTile script, and let it do the work. My command line went like this:

perl picturetile-win.pl –size 4800×7200 –margin 5 –border 100 –directory “2003 tile” –background white –scale .5 2003tile.jpg

Allow me to explain each command line option:

  • –size 4800×7200 is the size of the resulting image.
  • –margin 5 is the number of pixels in between the individual images. This can be negative if you want the images to overlap somewhat.
  • –border 100 is the number of pixels around the outside of the final image. Since I am working at 200 DPI, this is a half inch border.
  • –directory “2003 tile” is the location of all the files that are to go into my poster. I happened to put the 2003 tile directory as a sub directory of where I placed the picturetile-win.pl script.
  • –background white is the overall background of the poster. I don’t know all the possibilities, but you can definitely use most common colors (yellow, blue, black, etc.)
  • –scale .5 is how much to shrink (or grow) the individual pictures. 1 means don’t change their size, .5 is 50%, .1 is 10%, etc.
  • 2003tile.jpg is the file that the result will be stored in.

One of the cool aspects of PictureTile is that the placement of the images is random, using a kind of Tetris effect to put them in place. Therefore, each time you run it, you’ll get a different resulting image. I ran it several times, and sometimes I would get all 50 photos in place, sometimes I would get only 48. Sometimes I liked the layout, sometimes I didn’t. I ran it 5 or 6 times before I got the one I liked.

As a final touch, I edited the poster in Paint Shop Pro, and added the year in one of the blank spaces.

Other Possibilities
I’ve played around with the PictureTile script, and was able to add a random picture rotation (very slight) so that the pictures would look like they had been placed there by hand. Now, if I could just get a drop shadow to work correctly, they could really look like photos tacked on a poster board.

Digital Picture Frame

One of my more recent projects was a “Digital Picture Frame” or “Walltop”. In this project, I took an old laptop, and converted it into a digital picture frame, similar to those you can find on Amazon or eBay.

I had two primary goals:

  1. It had to be acceptable to my wife
  2. It had to be cheap (or free…)

The first goal is obvious. I wanted it to be useful, and to be useful it had to hang on a wall (picture frames in closets aren’t worth crap). In order to get permission to hang it on the wall, it must be acceptable to my wife.

The second goal works like this–I’m a techno-geek. I like technology. I like gadgets. However, I’m frugal (OK, cheap) and my money is better spent putting a new roof on the house (damn, still need to do that) than it is putting a fancy electronic gadget on the wall.

So with those two goals in mind, I set off to create this:

The Hardware
In order to display images, I knew I didn’t need a very powerful laptop. Even crappy laptops are going for $100 used at eBay or other resellers. Even $100 was too rich for my blood (see goal 2 above). So I figured I would ask around. I work in IT, and figured someone had an old laptop they would let go for almost nothing. The second or third person I asked said “Oh yeah. I’ve got one sitting in my closet that I haven’t used for 2 years. You can have it on one condition.” Damn, “how much?” I wondered. “You can’t give it back” he continued. Score! Laptop: $0.

The laptop is a Pentium 150Mhz with 24MB ram, Windows 98 (Of course I have the license for that!), 2GB hard drive, PCMCIA network card, C
D-ROM, Floppy, pretty much everything I could want.

So I took the laptop home, booted it up and started installing software to be sure it could do what I wanted it to do. More on the software later. This was simply my proof of concept phase.

After I was convinced that I could accomplish the software pieces, I took the laptop apart. Most other digital picture frame “HOW-TOs” go into great detail in how they accomplished the hardware feat. Since you are unlikely to have the exact same laptop, I won’t bore you with the details. (I didn’t bother to take pictures of it at this stage anyway). The hardware went through two phases:

  1. First I took apart only what was absolutely necessary to detach the screen from the base. Probably 90% of the laptop was still intact. The display data and power cables were just barely long enough so that I could fold the CPU up back behind the display. This worked very well until summer. When summer came, the fan ran constantly and drove me nuts. So next came phase two.
  2. I took the whole thing apart, and completely stripped out the innards. The display remained largely intact, I only removed a front bezel. The rest of the high voltage and display circuitry remained in the back part of the display case. I know how sensitive this stuff is, and I didn’t feel like messing with it. The rest of the laptop consisted of a) mother board, b) hard drive, c) PCMCIA slots, d) BIOS battery. No keyboard. No CD. No battery. No case. Just bare board. I then took the mounting screws from the serial and parrallel ports, attached them to mounting holes in the mother board, and epoxied them to the back of the display. You can see the view from the sides:



Some people have chosen to do without the harddrive, choosing to boot from CD, and pull images either from a wireless network, or pull them from compact flash card, etc. While this is certainly possible, my requirement 2 prohibited this approach for my project. Also, the sound of the harddrive is minimal (and is only on for 3 minutes out of every 15) so that requirement 1 is not in jeopardy.

The Frame
I searched all the art and craft supply stores to see if I could find a frame that would be deep enough and large enough to hold the laptop. I couldn’t. So I decided to build my own. I went to my local hardware store and bought three things: solid wood door moulding, 24×24 finish quality plywood, and 1/2″ dowel. I think I spent less than $10.

I cut the moulding using my mitre saw to fit my laptop display exactly (well, close). I glued the pieces together and let it dry well. I cut the plywood to be the same size as the front. I then futzed around with all kinds of bracketing techniques for hold the laptop and diplay in place. None worked like I wanted, so I settled on the four dowels method–two on the bottom and one on each side. The assembled laptop (walltop, whatever) slides in the top, snuggles in between the two side dowels, and rests on the two bottom dowels. I drilled holes in the back and the front frame (very carefully) and glued them in place.

Now, what to paint it with? Remember the two goals? Lucky me, I just happened to have a small can of left-over black satin Rustoleum. Score! Paint cost: $0. Two coats, with a gentle sanding in between made it look quite nice, if I do say so my self.

Initially, I cut the dowels so that the phase 1 configuration fit very snuggly between the frame and the back panel. When I removed all the casing for phase 2, it didn’t fit so snuggly any more. So I took some duct tape (YES!), folded it in half lengthwise so that there was no adhesive exposed, and used it as a strap with staples to hold the display against the front frame.

Software
OS: Windows 98. That was not really a choice. It came on the laptop, and since I know Windows better than Linux, I figured my chances of completing the project were better on Win98. In addition, I created my own start up graphic which says “Please wait while your digital picture frame starts”.
I created a folder called “My Pictures” and I shared it on the network. I named the computer “Frame”, and set the network card to DHCP.

Display Software: Irfanview. I created a batch file to start Irfanview in slideshow mode, and put a short cut to it in the Startup group. I set the slideshow to look at the My Pictures directory, randomly show the images, and change them every 15 minutes. I set it this long because I wanted it to be like a piece of the environment, not something you sit and watch.

Remote Control: Since I don’t have a keyboard, I need to be able to administer it on the network. So I installed RealVNC. That way I can put the frame on my network, boot it up, and go to “http://frame:5800” and have complete control over the laptop.

Image copying: I could just copy images to \\frame\my pictures. However, I have only 800MB of free disk space (yes, I could probably make more if I was really willing to strip Win98… don’t need to yet) and over 2GB of images on my normal PC. So I downloaded ImageMagick and wrote this batch file:

@echo off
set LOCALFOLDER=%TEMP%\Frame
if not exist %LOCALFOLDER% mkdir %LOCALFOLDER%
if exist “\\frame\my pictures” net use z: “\\frame\my pictures”

:start
if `%1`==“ goto done
for /f “delims=`” %%j in (%1) do set BASE=%%~nj%%~xj
echo %BASE%
convert %1 -resize 800×600 “%LOCALFOLDER%\%BASE%”
if exist z:\ ( copy “%LOCALFOLDER%\%BASE%” z: del “%LOCALFOLDER%\%BASE%”)

shift

goto start
:done
if exist z:\ net use z: /delete

I called this “send_to_frame.bat” and I put a shortcut to it in my “Send To” folder. Then any time I need to send a picture to the frame, I just right click on it, point to Send To, then choose Frame. This automatically resizes my photo to 800×600 (the diplay resolution of the laptop) and copies the file to the shared folder. If the laptop isn’t on the network, it copies the file to %TEMP%\Frame (which is easy to get to from Start, Run, “%TEMP%\Frame”). Then I can copy the files manually to the share when the frame is on the network the next time. One minor note with sending files this way, you can only select 20ish files at a time. I don’t know exactly what the number is, but if you go over it, you’ll get an ugly error.

Conclusion
Now I have a digital picture frame/walltop that cost less than $10. I leave it running all the time. The only noise (in phase 2) is the disk drive every 15 minutes for a minute or two. Nearly every time I look at it there is a different picture. The best part is when my kids look at it: “Oh, I remember that trip to the zoo!” or “Daddy, when was that?”. When I feel like it, I take it off the wall, and walk it up to my router, copy some files and take it back to its home. The whole process takes only a few minutes, and since I have so many pictures on it already, I don’t care if the latest photos don’t get on it for a month or two.

Next steps
I’ll probably get an 802.11g card for it, if they have Win98 drivers (haven’t looked into it yet). That way it will stay on the wall all the time. I could also script it to periodically pull up a web browser to get a weather image or something. Cool stuff like that. But I’ll wait until those cards are cheaper… (anyone have one they’d like to give me?)

I’d like to figure out how to get it to turn off and on the display at scheduled times. That way I can save some power at night when we aren’t looking at it.