Monday, 10 September 2012

Letting ImageMagick do the heavy lifting

Sometimes, as the files from our digital cameras get ever larger, we find that we don't need such huge files, and need to make a set of smaller images. Think of it as a set of proof-prints for the post-film world.

There are plenty of applications which will do this - iPhoto, Picasa and any number of things supplied with the camera. Trouble here is that the GUI is not really necessary in this case. There will be some performance penalty to be paid for loading thumbnails of the images, and it is likely to be a more than one-click operation.

If you know exactly what you want to do, then this is more easily accomplished in ImageMagick. For instance, I have recently had the need to perform the following steps, repeatedly on several sets of images:
• Get the image from a locally mounted server directory
• Make a copy
• Resize the copy and drop the JPEG quality a bit
• Turn it upside down
• Save it into a new folder
To do this in ImageMagick is simple. Unusually for me, this example is in DOS, but a *NIX version would be much the same. In the directory where your original files are held:

for %A in (dir *.JPG) do convert -resize 1500x1500 -rotate 180 -quality 70 -verbose "%A" "path\to\the\resized\images\%A"

And then hit return. Quoting out the paths helps with images with spaces in the names, and the "verbose" switch ensures you have some output on screen.

Tuesday, 30 August 2011

What is the Barrow Kipper?

Really good series of short videos leading up to the opening of the New Walk Museum's Dinosaur Gallery this weekend. Even better, there are preshistoric marine reptiles and fossils as well. Having seen the "Barrow Kipper" on the traffic island, I'm looking forward to seeing the real thing!

Sunday, 31 July 2011

"Disappearing acts"

Nice series of photo slideshows from The Guardian about heritage crafts:

Thursday, 16 June 2011

Hacking work

"Benevolent hackers see the future and pull us toward it."

http://www.amazon.co.uk/gp/product/0670919500/

Friday, 18 March 2011

NYT Museums Special; Arduino

New York Times has a Museums Special section online today. Amongst the articles there is one covering the use of Arduino in museums.

Wednesday, 9 March 2011

Focus 2011

Returned earlier this evening from my annual visit to Focus on Imaging, which fortunately for me is held in Birmingham, so is easy to get to.

Just a few notes for now, perhaps more to come in a future post:

• My general feeling is that the industry is settling down again now after the turbulent times of the last few years - the film/digital war is over, and the megapixel-race is now a steady climb.
• There seemed to be more interest this year in continuous lighting kits based on CFL (continuous fluorescent light) technologies, both for beginning users and high end pro work.
• Kits and accessories for modifying the light from compact flash-guns (e.g. "Speedlites") were also popular, as people look to improve the results they can get with their existing flashguns. This might also be called the "Strobist-effect"
• There are now plenty of services who will take your digital files, and take them right through to a printed book output. Or, you can print your own in-house using any one of a number of inkjet printers
• Conservation storage for both new and old photographs was also covered, courtesy of Timecare.
• A service called "Lab Direct" from Ilford that offers digital prints on "proper" black-and-white paper. A good example of old meets new. My sample print even had that wonderful smell of hypo (sodium thiosulphate)....
• Some truly superb cameras from Linhof and Cambo utilising the newest digital backs and large format lenses. Unfortunately, impressive resolution also brings with it an impressive price.

Tuesday, 15 February 2011

Sitting on the .DOC of the bay....

Seems I have a lot of files in various word processor formats (doc, docx, wp, etc) which I would like to turn into one unified format, and since editing will not be required in the future, I choose PDF.
Now it would be perfectly possible to 'print-to-PDF' using Mac OS X, and for a small number of files that would be fine. Alternatively I could use OpenOffice's PDF export function. However I got to wondering if there was a solution that could be used by people who have no access to any PDF functionality in their operating system.

Turns out there are plenty of "PDF servers" available, which would make sense for larger organisations. However it is also possible to use OpenOffice from the command line to do the same thing. Here's how:

• I already have a version of OS X Snow Leopard, which will give me the Terminal access I need. Java is also installed and up-to-date, as is the latest version of OpenOffice
• First we start OpenOffice in "headless" mode using Terminal:
iMac:~ simon$/Applications/OpenOffice.org.app/Contents/MacOS/soffice.bin -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service" & Don't forget the ampersand at the end - it returns control of the terminal to the user after the service has started. • Use grep and netstat to check it is running iMac:~ simon$ ps aux | grep soffice
simon 1810 42.4 1.2 515704 49620 s000 S 1:14pm 2:27.21 /Applications/OpenOffice.org.app/Contents/MacOS/soffice.bin -headless -nofirststartwizard -accept=socket,host=localhost,port=8100;urp;StarOffice.Service simon 1789 0.0 1.1 514160 47400 ?? S 1:13pm 0:01.07 /Applications/OpenOffice.org.app/Contents/MacOS/soffice.bin -headless -nofirststartwizard -
accept=socket,host=localhost,port=8100;urp;StarOffice.Service simon 45573 0.0 0.0 252104 88 s000 R 1:20pm 0:00.00 (soffice.bin) simon 45571 0.0 0.0 2435116 524 s000 S+ 1:20pm 0:00.00 grep soffice

iMac:~ simon$netstat -an | grep 8100 tcp4 0 0 127.0.0.1.8100 *.* LISTEN • Now it is necessary to find something that will allow us to interact with the service. I found JODConverter, which can be downloaded from http://www.artofsolving.com/opensource/jodconverter. A version is available which includes a bundled version of Apache Tomcat server. • I had to change the default port from 8080 to 1234, as I had something already running on 8080, but there are clear instructions within the package on how to do this. • Now we simply run the startup.sh script in the /bin directory: iMac:bin simon$ ./startup.sh