Thursday, December 27, 2007

Why is organizing photos a baffling ordeal?

If you know me, you know that I like to take photos. I have two cameras, one of which is compact enough to fit in my pocket so that I can capture rare or interesting things at the spot. I know that people often wonder "when can I get your pictures?". Organizing photos is a demanding task for me. It's not just a simple matter of transferring files from the memory card to the hard drive. There are many other little tasks, and I will explain why



JPEG files produced by digital cameras usually contain Exif metadata (data about data). What it records includes a number of things such as time, aperture, shutter speed, orientation, and other camera settings.


While taking photos with portrait orientation, Canon cameras still store the photo in landscape orientation, but flip the orientation information in Exif. As a result, not all software recognizes this method of orientation. Photoshop, ACDSee, Firefox, and IE don't recognize Exif orientation. So for maximum compatibility, I have to rotate these photos manually. There are many software that can do this. But most destroy or partially destroy the original Exif information. The only one that does not, at least for Canon-camera-captured photos, is Canon's own ZoomBrowser application.


As I said, Exif includes timestamp. The file system, NTFS in my case, also records timestamps. NTFS records the timestamps in UTC internally, and displays with user's time zone setting. When I change my system's time zone, the timestamps on my file system appear to shift as well. But this is not the case for the timestamps in Exif, as it is part of the file. I leverage this difference to indicate where the photo was taken, at least in what time zone. I make sure that the timestamp in Exif is the local time where the photo was taken, while the NTFS timestamp is in the time zone of my system. But wait, why am I telling you this? How does this impact my organizing photos? Rotating photos changes the NTFS timestamps. So I have to correct the NTFS timestamps after rotation using ACDSee.


Canon cameras capture videos in Motion JPEG, a compression scheme that doesn't really compress much. Therefore, videos must be recompressed. And my choice of codec is Xvid. Here are the steps that I must perform to convert MJPEG to Xvid.
  • Extract the audio (wav file) from the original video
  • Convert the wav file to mp3
  • Encode the video with Xvid as the video codec, and the mp3 as audio
  • Inspect the quality of the new video (watch two files side by side)
  • Validate that it is indeed encoded with Xvid and mp3
  • Restore the original time stamp
  • Delete the old copy and rename the new copy


There are thousands of websites that provide photo service. But I'm not satisfied with any of them. The problem? Size and scale. These websites usually shrink the image size. If the size can be preserved, then most likely they limit your upload capacity. If you know me, then you would know that size and completeness is a big deal to me. There are no free online solutions for 9GiB of 8600+ files. What better place is there than my own hard drive? So I used JAlbum to generate HTML and thumbnails, then I host them with Apache. This process is also time consuming (computer time). I'm looking for alternatives.

Text description

People often ask me why I don't add text to the photos. I could, even with the complex process described above. But it's not the action of adding text that takes most of the time. It's the time spent on deciding what to write. If I were to write anything at all, I must look up the right references, provide background stories, and most important of all, write them in both Chinese and English. I tried this with my trip to Paris and England. And it proved to be a time consuming task as well.

Since it is a complicated process, it is best for me to accumulate the photos for a while and do them in batch. I can achieve economies of scale by performing the same tasks repeatedly in a shorter amount of time.

Monday, December 10, 2007

Scale of large things

We often hear "project A will cost $X million" or "something will cost $Y billion" on the news. Do we really understand how big these amounts are? Studies show that a group of people would spend a lot of time to decide how to spend a US$3000 budget, and relatively less on a multi million dollar budget. The reason is simple: we know how big US$3000 is. For your convenience, I've compiled a table of large monetary values. While I was doing this, I realized that the number of units sold is also a frequently mentioned figure on media. So without further ado,

Source Date Thing US$ TW¥ CN¥
IMF thru Wikipedia 2006 Nominal GDP of the World 48.25 tr. 1559.77 tr. 356.82 tr.
IMF 2006 Nominal GDP of the U.S.A. 13.19 tr. 426.58 tr. 97.59 tr.
White House 2007 Outlays of the U.S. Federal Government 2.78 tr. 89.85 tr. 20.55 tr.
IMF 2006 Nominal GDP of the P.R.C. 2.64 tr. 85.50 tr. 19.56 tr.
IMF 2006 Nominal GDP of France 2.25 tr. 72.81 tr. 16.66 tr.
HM Treasury 2007 U.K. Government expenditure 1.20 tr. 38.70 tr. 8.85 tr.
IMF 2006 Nominal GDP of the R.O.C. 364.56 b. 11.79 tr. 2.70 tr.
IMF 2006 Nominal GDP of Singapore 132.16 b. 4.27 tr. 977.42 b.
IMF 2006 Nominal GDP of Vietnam 61.00 b. 1.97 tr. 451.12 b.
Forbes 2007 Bill Gate's net worth 59.00 b. 1.91 tr. 436.36 b.
Yahoo Finance 2007 Microsoft's revenue 54.07 b. 1.75 tr. 399.90 b.
Directorate-General of Budget, Accouting and Statistics, Executive Yuan 2007 Outlays of the R.O.C. central government 51.46 b. 1.66 tr. 380.62 b.
Yahoo Finance 2007 Microsoft's gross profit 40.43 b. 1.31 tr. 299.02 b.
Yahoo Finance 2007 Amazon's revenue 13.15 b. 425.14 b. 97.26 b.
IMF 2006 Nominal GDP of Brunei 11.56 b. 373.77 b. 85.51 b.
Apprentice 505 2006 Cruise line industry 10.00 b. 323.30 b. 73.96 b.
NY MTA 2007 Total operating budget of NY MTA 9.72 b. 314.09 b. 71.85 b.
Apprentice 504 2006 Americans spend this much on cereal 6.00 b. 193.98 b. 44.38 b.
IMF 2006 Nominal GDP of Madagascar 5.50 b. 177.78 b. 40.67 b.
Department of Budget, Accounting, & Statistics, Taipei 2007 Taipei government expenditure 4.39 b. 142.05 b. 32.50 b.
Yahoo Finance 2007 Amazon's gross profit 2.46 b. 79.53 b. 18.19 b.
Washington Metro 2007 Budget of 2007 1.89 b. 61.14 b. 13.99 b.
IMF 2006 Nominal GDP of Eritrea 1.16 b. 37.50 b. 8.58 b.
IMF 2006 Nominal GDP of Liberia 614.00 m. 19.85 b. 4.54 b.
Yahoo Movie 1997 Cumm. gross of the movie Titanic 600.79 m. 19.42 b. 4.44 b.
Yahoo Movie 2004 Cumm. gross of the movie Shrek 2 441.23 m. 14.26 b. 3.26 b.
Reuters thru Wikipedia 2007 Official list price of Airbus A380 319.20 m. 10.32 b. 2.36 b.
Taipei MRT 2006 Revenue of Taipei MRT 311.78 m. 10.08 b. 2.31 b.
Yahoo Movie 2003 Cumm. gross of X2: X-Men United 214.95 m. 6.95 b. 1.59 b.
NY MTA 2004 Long Island bus operating budget 100.60 m. 3.25 b. 744.04 m.
Department of RTS, Taipei 1988-2006 Per km cost of high volume lines (Taipei MRT) 89.58 m. 2.90 b. 662.51 m.
IMF 2006 Nominal GDP of Kiribati 70.00 m. 2.26 b. 517.72 m.
Taipei MRT 2006 Pre-tax profit of Taipei MRT 31.55 m. 1.02 b. 233.34 m.

Source Start End Thing Unit thru Wikipedia 2001/10/25 2006/1/15 Windows XP 400.00 m.
Sony thru Wikipedia 2000/3/4 2007/9/20 PS2 Worldwide 120.00 m.
Wikipedia 2001/10/23 2007/10/15 All iPods 119.00 m.
Sony thru Wikipedia 1994/12/3 PS 102.49 m.
Wikipedia 1983/7/15 NES 61.79 m.
Motorola thru Wikipedia 2004/11/8 2006/7/18 RAZR V3 50.00 m.
Nintendo thru Wikipedia 1990/11/21 SNES 49.00 m. thru Wikipedia 1985/9/13 Super Mario (All-stars excluded) 40.24 m.
GameDaily Biz thru Wikipedia 2000/10/26 2007/9/13 PS2 US 39.10 m.
Nintendo thru Wikipedia 1996/6/23 2005/3/31 Nintendo 64 32.93 m.
Wired thru Wikipedia 1988/10/29 Sega Genesis (Mega Drive) 29.00 m. thru Wikipedia 2001/11/15 2006/5/10 Xbox 24.00 m.
Nintendo thru Wikipedia 2001/9/14 2007/9/30 GameCube 21.66 m. thru Wikipedia 1988/10/23 Super Mario 3 (All-stars excluded) 18.00 m.
Punch Jump thru Wikipedia 2005/11/22 2007/9/30 Xbox 360 Worldwide 13.40 m.
Nintendo thru Wikipedia 2006/11/19 Wii 13.17 m.
GamePro thru Wikipedia 1998/11/27 Dreamcast 10.60 m.
IGN thru Wikipedia 1998/4/1 StarCraft 9.50 m.
GameDaily Biz thru Wikipedia 2005/11/22 2007/9/13 Xbox 360 US 6.30 m.
Sony thru Wikipedia 2006/11/11 2007/9/30 PS3 5.59 m.

Note: Using the following exchange rates
US$ = TW¥ 32.33
GB£ = US$ 2.03947
US$ = CN¥ 7.396