Tuesday, 26 January 2010

Got photo website uploads working again

This morning I checked my email, then made the Licensing XMP templates for Commercial and Editorial Image Licences.

I opened up Adobe Bridge and found an image to apply the XMP to, but I wasn't sure if the image should be licensable on a commercial or editorial basis. The photo was of Acton Scott Hall, taken from what I'm pretty sure was a public footpath.

I looked on Alamy, and found there was quite a few photos from Acton Scott there. Clicking on the 'Commercial' tab (as opposed to the 'All of Alamy' tab) though, there were no results.

Next I checked the advice on Photoshelter, which says
Property releases are generally required for private homes and other privately-owned buildings and land. Some stock sites might require property releases for other forms of property as well, such as animals, vehicles, and personal possessions. In general, both stock houses and image buyers tend to be less concerned about property releases.
and
Images that focus on private homes and other buildings need a property release for most stock sites. PhotoShelter will still accept these images without releases.

Images that feature many private homes or buildings do not generally require a release, since the focus is not on any one particular building. However, identifiying details such as street names and house numbers should not be visible. (PhotoShelter will accept without a release)
Since skyline images do not focus on any one particular building, a property release is not required.
Pets are considered property, and some stock sites might require property releases for images of pets and working animals. (PhotoShelter will accept without a release)
In general, if an attraction, such as a park, is visible from a public place, it does not need a property release.
Some famous buildings or landmarks do require a property release for certain usages. (PhotoShelter will accept without a release)

I checked the article linked to from the Photoshelter article, Photo Attorney: Property Releases Revisited, which says there is no legal precedent set to require property releases.

I checked Getty, who say
Model and property releases ensure depicted individuals and property, e.g. brands, homes, etc. contained within an image/clip are cleared for commercial use.

However, if an image/clip does not contain an individual or property (see examples), then commercial use of the image/clip will not require any model or property releases as there will be no one to obtain a release from.
So while the photo Attorney says there's no legal need to obtain property releases, Getty seem to require them for all images except where there isn't anyone to obtain a release from. The example images they have are of a frog, the sea, and a dimly lit landscape where the focus is mainly on the clouds covering the valley below and the sun rising above the clouds.

Looking at images of Big Ben and the Parliament buildings on Getty, it is quite interesting to see that whether a property release is needed or not for the image to be used commercially is quite inconsistent, e.g.

I modified the local copy of my website to take account of the new XMP. One of the things I wasn't sure about, was how I should store the license type. Both license types (Commercial or Editorial) are Boolean (true or false), the way MySQL stores this is actually as an integer, where 0 equates to false and anything else (but you would normally use 1) equates to true. But for printing values out in a website you don't really want to be using 0 and 1, but rather true and false, or yes and no.

Doing some googling I saw that some people suggested using tinyint, some suggested BOOL (which is an alias of tinyint), and some suggested using enum with true and false or yes and no as the enum values. Then I read this thread on Stack Overflow, where the top answer suggested using BOOL or BOOLEAN, and that MySQL hopes to implement a proper BOOL datatype in the future.

So I decided to stick with using the BOOL datatype for my boolean fields, then checking if the value equates to true in PHP and printing 'Yes' or 'True' if it does, and otherwise printing 'No' or 'False'.

After finishing the updates on my local copy of the site, I updated the live site on the web server, then proceeded to upload some photos. However, when I got to uploading a large pano (approx 10000px x 5000px), ImageMagick didn't create a resized smaller version of the image. I was calling ImageMagick with 2>&1 from PHP, and printing the result, in the hope that this would mean any error messages would be printed out on the webpage.

But there weren't any errors printed for the initial image resize, just for the further resizes, which were caused because they try and resize the resized image, which obviously didn't exist since ImageMagick had failed to create it.

Testing the exact same command from the shell, all I got was
Segmentation fault
I resized the image to the correct size in Photoshop, and uploaded this to the correct place in the server. Then I tried the ImageMagick command used to resize the resized image to a smaller image. That gave me the following:
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 4MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 2MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 4MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 9MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 3MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 8MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 3MB @ cache.c/OpenPixelCache/4078.
convert: unable to extend cache `../CSI/Img/99-The-Long-Mynd.jpg': 8MB @ cache.c/OpenPixelCache/4078.
convert: Application transferred too few scanlines `../CSI/Img/99-The-Long-Mynd.jpg' @ jpeg.c/EmitMessage/233.

So I create the other image sizes needed in Photoshop, and uploaded them to the web server so at least the website wouldn't have any problems with missing images.

Then I did some googling to try and find what the problem was, and found this thread on the ImageMagick forums: [solved] Big jpeg issue, where the answer was given:
the temporary disk space required by the pixel cache could not be allocated. The solution is to point the temporary space that ImageMagick writes to a partition with plenty of free space. For example,

convert -define registry:temporary-path=/data/tmp mybigassimage.png mybigassimage.jpg


or you can set the MAGICK_TMPDIR environment variable.
I'm not sure how you set shell environment variables when using it from PHP, so I just used the -define registry:temporary-path option.

First I tried resizing the medium image (which gave the lack of tmp space error) to a smaller image using a different tmp path (I just created a folder called tmp inside my apps directory). That worked okay. Then I tried resizing the original image, which had given the segmentation error, and that worked okay as well.

After fixing that, I carried on uploading images to my website (takes ages for each image), while checking my email and the internet.

After dinner I watched an episode of The Equalizer.

I had accidentally added some XMP to a couple of images that indicated that they were available for commercial licensing, when actually they weren't. Unfortunately, while adding XMP via Adobe's XMP File Info Panel Import option is easy, there's not any easy way provided to remove XMP (short of replacing the whole XMP block).

I tried using exiftool, but since it was one of my own tags I needed to remove, it couldn't do it. So I had to add my tags I wanted to remove the the User Defined tags in exiftool. Luckily this is very easy thanks to the great examples in the Exiftool_Config file, it's just a case of copying or modifying a couple of the examples in there. Then I could use exiftool to remove the tags I didn't want in the files.

I also received a couple of CDs today that I had bought on Amazon the other day. One I already had downloaded, but the other one I hadn't downloaded, and I couldn't find it on isohunt either. So I actually had to break the shrinkwrap and rip it myself.

After ripping it, tidying up the tags / directory structure, and downloading the Album artwork, I started listening to it in Winamp. But only the left and right speakers seemed to be working. So I tried googling for 'Winamp 5.1 Upmix', which found me a thread in the Winamp forums where some drivers were linked to for the Audigy 2 (same as my soundcard) that allow you to upmix to 5.1. And the person asking the question said that the drivers fixed it for them. But unfortunately the link had been removed.

So I did some more googling and found this thread - Sound upmix software for Vista?, where one of the posters says

Quote:










Originally Posted by JaylumX
View Post

I thought one of the features of CMSS was the upmixing of stereo signals to 5.1.



Yep, and it works in Vista as well, just need to enable it in the Creative Audio Console.
But I have CMSS enabled in Creative Audio Console, and it's not upmixing. Luckily, they go on to say
Or if you're not adverse to a little INF modifying you can add Vista's own version of CMSS (as well as a couple of other little goodies),



http://forums.creative.com/creativel...cending&page=1
So I followed that link, and followed the instructions there. After installing the drivers as described, I ticked the 'Speaker Fill' option on the 'Enhancements' tab of the Speakers Properties, and I now have my stero tracks upmixed to 5.1 in winamp.

The weather was mainly overcast, then started to brighten up in the afternoon. The sunset was quite boring with a slightly hazy sky, but after the sun had set the sky gradually turned orange, making for an amazing sunset/twilight that actually lasted quite a while as well.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Mature Cheddar Cheese with Crispy Salad Sandwich; 2x Clementine; ½ Eccles Cake that me and L made on Sunday; Home-made Apricot Flapjack; Cup o' Tea.
Dinner: Shepherd's Pie; Green Beans; Carrots; Tomato Ketchup; Grated Mature Cheddar Cheese; Ground Black Pepper. Pudding was a Cherry Bakewell and a Chunky Choc Chip Cookie. Coffee; 2x Pieces of Sainsbury's Truffle Chocolate; Piece of Nestle Choc Noir (or sumat similar) Dark Chocolate.

No comments: