Posts | Comments

Archive for the ‘code’ Category

So I’ve been working more on my ImageServer2 application (massive image asset library, replacing Extensis Portfolio Client/Server system) for my employer.

In preparing for the complete departure from Extensis Portfolio Client/Server, I have found the one piece of my application that has been missing is the massive asset import and conversion (two visual previews: one a 600×600 constrained JPG and a 110×110 BLOB preview saved in a database). The missing piece was handled by the combination of Client/Server from Portfolio, but without these tools I needed to create a mechanism to handle massive imports (hundreds of images from CD/DVD or the Web).

I’ve been researching conversion tools (ImageMagick, GD, GM, Perl, Altercast, etc) and have found a combination of Perl and GM (similar to ImageMagick in features, but much faster) will be how I accomplish media tranformation (seven formats).

I’ve been testing this conversion process on a Linux tower (a Dell Optiplex GX620 running Ubuntu 7.10), and am in the process of setting up an Apple G4 tower running OpenSuse 10 to take on the heavy work of image conversion and database injection.

It’s not been an easy process. I first tried with Ubuntu 6.0.6 PPC version, which has failed constantly. Therefore, I decided to give OpenSuse 10 (more current) a try. I’ve had various failures, and it looks like today I’ve gotten my system nearly installed without error.

Here’s what I ran into:

1. I was using a KVM switch to handle multiple machines (the G4 included). The KVM had a USB mouse and an Apple Aluminum Keyboard. The G4 didn’t recognize the keyboard in time during it’s disk boot mode so I couldn’t succesfully hold down the “C” key to initiate boot from CD mode. Switching to an older USB keyboard (or plugging a keyboard directly into the Mac) solved that problem.

2. The OpenSuse installation needed to repartition the installed drive on the G4. This process constantly failed as OpenSuse has an issue with converting Mac partitions. After searching on the Web for awhile, I found that if I used the Mac OS install disk (10.4 desktop in my situation) and used the Disk Utility included to manually delete the partitions on disk I was ready for OpenSuse to take over. What I actually did was deleted any resident partitions, then created a single whole-disk partition with the Unix Filesystem (when creating partitions, check the dropdown, there’s tons of options).

3. Back in the OpenSuse installer, I allowed OpenSuse to use it’s default partitioning method to delete the Unix partitions (Apple’s Disk Utility actually created three partitions - go Apple!), and the install continued without any other errors.

I’ve now rebooted post install and am adding the root administrator password, etc. Things are looking up.

Once the install is finished I’ll be installing Perl modules, GM, and crossing my fingers that all my conversions work like magic.

I’m working on an asset management tool that needs to extract data from various image formats. Here’s the formats I need to extract from:

  • PSD (Photoshop)
  • EPS (Various originations)
  • AI (Illustrator)
  • JPG
  • PCD (Corel maybe?)
  • PICT
  • PPT (PowerPoint)
  • TIFF

The information I need to extract:

  • Creation date
  • Color mode
  • Horizontal resolution
  • Vertical resolution
  • Width
  • Height
  • Any embedded description (I imagine EXIF)
  • A blob thumbnail to embed in my database from the source asset

I’m at a crossroads as some of the above I can extract with GD or ImageMagick, however neither tool will give me 100% of the data from 100% of the images (in fact, even together I can’t get all I need). Ideally, I would bypass the PHP/Server-Side scripting tools alltogether and bundle a scriptable Mac framework into a RealBasic desktop application. That’s what I’ve been trying out lately, but as I’ve never coded in RealBasic before, and don’t know much about things like Core Image I’m a little lost.

Anyone have any success with a project like this? Thankfully, I have 2.1 million assets that already have this information stored for me, so the above issue will only be for new assets imported (which I have pushed out a delay on any importing for a month).

Update September 03, 2008:

I have upgraded ImageMagick on my server and have succesfully converted several formats, leaving PICT as the only one that’s giving me fits.

  • PSD (Photoshop) - Great!
  • EPS (Various originations) - Pretty damn good
  • AI (Illustrator) - Don’t need to convert at all
  • JPG - Great!
  • PCD (Corel maybe?) - Great!
  • PICT - Very bad results (see below)
  • PPT (PowerPoint) - Don’t need to convert (removing from new version)
  • TIFF - Great!

Ok, so here’s what’s happening with the PICT files: When I run a basic convert (or mogrify) I’m getting a very small thumbnail version that appears to be inverted. I’ve attached two smaller (GraphicConverter adjusted) previews of the input and output using $ convert Corb_AFP_026.PICT Corb_AFP_026.jpg as the flag.

Input (a smaller version of the original)

Output

See how strange that is? I’m not sure what special flags I need to add to handle the PICT files. It appears that Preview can read the files without error, and GraphicConverter handles them fine as well. However, a simple convert does not, resulting in the output above.

Any suggestions?

Update 2 (same day):

Looks like PCD is now in the mix of piss-poor conversion. I’m having the same output issue as with the PICT files.

So I just started playing with QIK (the streaming video application for the iPhone*) and I have to say - this is an absolute godsend application!

The opportunity to stream live video from music events will be a huge benefit to OSNAP.net!

More to follow.


*more phones are supported, but I use the iPhone first-generation.

In the next two weeks I will be sending e-mails to my existing clients about an impressive upgrade opportunity.

First, there will be a free migration for all paid customers to move to my new Grid Hosting system. This free upgrade will increase the amount of disk space a client can use, the amount of network traffic available to them, and the speed and responsiveness of the Web site(s).

Second (still related to the first), the free upgrade will provide my clients with their very own Web site control panel - now clients can control every aspect of their Domain! This has been a long time coming, and with the Plesk browser-based control panel installed for each domain, clients will no longer have to contact me for e-mail setting updates, database configuring, etc. Each paid customer will have 100% control over every aspect of their Web site.

Third, I will be offering some clients a new layout and design for their Web site. Some clients have used the same design for years, proving the layouts were effective. However, advances in technology, and the need for some to move away from Flash has given me the responsibility to help my clients update their designs. These updates will cost, of course, but I will provide each client with a summary worksheet should they choose to use another developer to update their Web site.

The updates will not be forced, however, the performance improvements and the suggestions I will make on the design and workflow of the domains will greatly enhance each clients business.

Keep an eye out on this blog, and in your inbox (should you be a client) for some exciting news.

chadedge dot-com is powered by WordPress. Design by Nofie Iman.