Thursday, 25 June 2009

Websiting and Dreamcasting

Today I was just doing some work on my photo website.

One problem I had was that when I did a GROUP_CONCAT on a column containing integers, it returned a Blob rather than the actual value (in PHPMyAdmin it said [BLOB - 1B]). Doing some googling I found an answer though - just perform a string operation on the GROUP_CONCAT, e.g.
Doesn't work:
SELECT GROUP_CONCAT( categories_id )
FROM img_categories
WHERE img_id =1
GROUP BY img_id

Does work:Doesn't work:
SELECT CONCAT(GROUP_CONCAT( categories_id ))
FROM img_categories
WHERE img_id =1
GROUP BY img_id


The other problem I had was with Color spaces and color profiles again. I decided it would be useful to store the color space/profile of the original image in the database. The Imagick PHP Extension has a function Imagick::getImageColorspace, which returns an integer value that corresponds to the value of one of the Imagick ColorSpace Constants.

The problem with this is that they don't seem to detected AdobeRGB, which is what most of my images in. They have constants for imagick::COLORSPACE_RGB and imagick::COLORSPACE_SRGB. I thought that maybe imagick::COLORSPACE_RGB means AdobeRGB, but I googling I couldn't see anywhere that said that.

Next I found that ExifTool can read ICC Profile tags, trying it out on an AdobeRGB image, I got found that -ICC_Profile:ProfileDescription had the value "Adobe RGB (1998)". So I thought I could use that to detect the image's color space. Then I tried an image from my Panasonic FZ-5 camera, and that didn't have an ICC Profile.

Looking at the exif though, the FZ-5 has a -EXIF:ColorSpace tag, so I guess I'll need to check both -EXIF:ColorSpace and -ICC_Profile:ProfileDescription. I also need to check a Nikon Image, processed through CaptureNX to check that fills in one or the other tags.

Also today, I went through my Dreamcast stuff to see if I had a spare Dreamcast cable that I could give to Moccle for his birthday, as his one is broken.
Dreamcast stuff
I found that I did have an Electronics Boutique SCART cable, when I tested it in Moccle's room, the sound would go on the TV, but not the picture. When I tried a different lead, an S-Video one, the TV didn't even detect that it was plugged in.

I moved the Dreamcast into L's room, and tried it with the same SCART lead on one of small TVs, and it worked fine, so it seems like the Dreamcast isn't compatible with Moccle's TV :(

Now I don't know what to get him for his birthday.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: Ham with mustard and salad sandwich; apple; satsuma; caramel Rocky; cup o' tea.
Dinner: Toad in the hole; peas; Broccoli; potatoes; mustard; gravy. Pudding was a Cherry bakewell with custard, and I also had a piece of Fabulous Bakin' boys' flapjack with custard. Coffee.
Supper: Milk chocolate digestive; malted milk; cup o' tea.

No comments: