Tuesday Apr 22, 2008

Dealing with uncommon image formats

    During my downsizing and de-cluttering, I came across a half dozen 3.5" floppies that held digitized pictures. These were from a time before I had a digital camera, and were done as part of the film processing service. They happened to be of my oldest son's birth, so they are important, and I wanted to be able to view them with ease and manage them the same way I do the pictures from my digital cameras.

    Ooops, they are in KGP format, Konica Camera File, so it must have been a Konica based service. My MackBook Pro, running OS X 10.5.x, didn't recognize the format as something any of the apps currently installed knew what to do with, so off to Google for help. There I find XnView, a free graphics viewer supporting mucho formats, and it's associated utility NConvert. As it turns out, the Mac OS X version of XnView is in transition from an older release to a new alpha of a universal binary re-write. I tried it and it seems to work OK, but I really wanted the files in a more usable format.

    So, I tried NConvert, which turns out to be a CLI-based utility. I wanted to do a bulk conversion from KGP to .jpg files, and after a quick review of the command line parameters, /Applications/NConvert/nconvert -help, I took a stab at doing my conversions, as follows :

/Applications/NConvert/nconvert -in kqp -o %.jpg -out jpeg -keepfiledate \*

    This worked great, in a quick, efficient manner. Keep in mind that the command examples I give are based on where I put the nconvert directory, and that this command line execution is done via the Mac OS X Terminal application, giving me access to the BSD under-pinnings of OS X. Am I done and ready to upload them to SmugMug yet? Not quite.

    Apparently, when one set of film was developed, either I had taken all the pictures upside down, or the developer processing them upside down. Either way, one whole floppy worth of pictures were upside down, and that diminished from their excellence, or at least from them being readily recognizable. Another quick review of command line parameters, and I tried this on that floppy's files:

/Applications/NConvert/nconvert -in jpeg -o %.jpg -out jpeg -keepfiledate -jpegtrans rot180 \*.jpg

    Et voila, c'est magnifique. All the pictures where then burnt onto CD for safe keeping, and uploaded to SmugMug for sharing, discretely, of course. Then yesterday, as I considered blogging with pictures of my bike riding family, I got to thinking that perhaps I could replace my old standby method for resizing my RAZR taken pics to something I consider more usable in a blog post. My habit had been to use The Gimp to load, resize and save each picture. Sure, there might be a way to automate that, but here I was already becoming an expert at nconvert. And, with the number of pictures I was considering to post, it was time for a bulk method, and here it is:

/Applications/NConvert/nconvert -in jpeg -o %b.jpg -out jpeg -keepfiledate -resize 30% 30% \*.jpg

    It's just that simple. Nconvert's help listing is really long, so I won't post it here, but I highly recommend nconvert for your image manipulation needs, as long as you can deal with command line utilities. Oh, I should mention that both XnView and NConvert are cross platform apps, available on Solaris, Linux, Windows, and obviously Mac OS X. Thanks Pierre Gougelet.
About

A place where Perley Mears sounds off on topics relevant to his work at Oracle.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today