Tuesday, 24 March 2009

Testing diffusion methods for the MT-24EX & serving XHTML correctly


This morning I checked my email, then went about modifying my small diffusers so they would fit on the MT-24EX's flash heads with velcro, rather than sellotaping them to the flash heads.

I thought what the problem might be with why the exposure was darker with the small diffusers (with no diffusion gel) than the bare flash heads might be that the diffuser was stopping the flash from going downwards. You can hopefully see what I mean in the image below. The focus point is on the pencil tip, but if you look at the diffuser, much more light will fall behind the pencil than on the tip or in front of it. Ideally you should probably have the amount of light in front and behind about equal. The light in front is useful as it can bounce back from whatever is in front of the subject and provide some fill.


I cut the bottom front of the diffusers and bent them downwards into a down facing lip, then tried shooting a flat stone again, and the exposure was about the same between the modified small diffusers (with no diffusion) and the bare flash heads. I went in the garden to try some real life shots with the small diffusers (with no diffusion), and 1/16th power seemed to work okay, when before I needed 1/8th power to get a decent exposure. The exposure isn't as bright as with my large diffusers though, which is a shame.

After downloading the test pics to my comp I decided to try the bare flash heads, but when I went in the garden there weren't any flea beetles around (I'm using them for my flash diffusion tests). I walked around and waited for a few minutes, but didn't see any so came back inside and wrote this blog post.

I just went in the garden again, and only saw one flea beetle, and he disappeared before I could find him in the viewfinder. I put the washing out, checked for flea beetles and didn't see any, then had lunch.

After lunch I went on Animal Crossing for a bit. I went in the garden again, and finally found a couple of flea beetles, so tested out the bare flash heads, and indeed need 1/16th power to get a reasonable exposure, just like the small diffusers without any diffusion. So now it seems the small diffusers in of themselves aren't causing any noticeable light loss, I can work on putting some actual diffusion material on them.

I plan on first trying just a piece of Hampton Frost (253) gel on the front of the diffusers, then if that works okay I will try sticking another piece of stronger diffusion material on top (probably White Diffusion (216) gel) to block the direct flash, like Lumniquest do: Lumniquest mini softbox. Then if that works okay, I'll try John K's method of elevating the top flash head using an adjustable hot shoe adapter.

Well, I tried the diffusers with a piece of 253 on the front, and the exposure at 1/16 power was still good, though the highlights still looked quite harsh. Next I stuck some 216 on the 253 to cover the flash, like so:

However, it didn't seem to reduce the harsh highlights at all and just resulted in around ½ - 1 stop light loss.

I kept experimenting with diffusers but didn't really get any satisfactory results. I didn't try elevtaing the main flash like John K, I'll have to try that tomorrow.

I checked my email, then modified my diffusers again. It was too dim outside to test them, so I just tidied my room a bit, then it was dinner time.

After dinner I read a bit about xhtml, and found that you need to serve it with a mime type of 'application/xhtml+xml'. So I tried that, but IE just gave me an error. Luckily I found a post that shows how to do it: PHP: sending correct Content-type header for XHTML. Though I used stripos rather than the more resource hungry preg_match.

I decided to see if it would be possible to send xml to IE rather than text/html, and found this blog post: How To Serve XHTML to Internet Explorer 6 And 7 as XML Using Content Negotiation.

However, after implementing that I was getting an error:
The server did not understand the request, or the request was invalid.
Error processing resource 'http://www.w3.org/TR/xhtm...
After doing some googling I found this post: w3.org DTD/xhtml1-strict.dtd blocks Windows IE users and this thread: IE fails on XHTML served as application/xml.

It seems the problem is that IE tries to parse the full DTD each time it loads a page, so W3C have had to block IE from viewing the DTD as obviously there must be quite a few pages being served as XML. First I tried just not sending the Doctype to IE, but of course, this triggers 'quirks mode'.

So I tried the trick mentioned in the thread above to use an xsl output declaration to set the doctype. However, now I needed to check whether the document was rendered using quirks mode or not. A bit of googling found this page: About Quirks-Mode, which suggests checking the value of document.compatMode using javascript.

However, when I tried this, it didn't work and I just got an error
Internet Explorer cannot download .
Unspecified error
So each time I want to check what compatibility mode the document was rendered in, I have to:
  1. open the MS Script debugger
  2. set it to break on next statement
  3. do something on the page that uses javascript
  4. then type document.compatMode in the script debugger command window

It's annoying how IE doesn't have anything like firebug available for it. I also wanted to see check what HTTP Headers IE was receiving. The MSDN Internet Explorer Developer Center suggests using a program called Fiddler to check the HTTP Headers.

Unfortunately when checking the compatibility mode, I found IE7 was still rendering the page in quirks mode, despite me setting the doctype using the xsl output declaration. Looking at the XSL tutorial on W3Schools, I realised I should be able to just output the doctype as normal tag, just like they output the different html tags in that tutorial. But when I tried it, the Doctype declaration wasn't valid xml, so it caused the page to fail.

After some googling I found this page: How do I generate a reference to a DTD using XSLT? After adding that to the XSLT I got an error saying 'Cannot have a DOCTYPE declaration outside of a prolog' (actually I was already getting that error when I stuck the doctype declaration in the XSLT as plain text). I deleted the xsl:output that I had tried to set a doctype with before, and that got rid of the error and the page rendered okay. I checked the compatibility mode, and it said 'CSS1Compat', so seems to be working okay.

I also tested the page in Lynx and FF3, and seems to be working okay. Of course I still haven't tested in all the other browsers yet and the page is very basic, so there may be more errors to overcome. I'm particularly concerned about what the XSLT will do to my page if it has non-html elements in it. The ability to include elements from other namespaces (particularly RDF) is the only reason I decided to try and code this site in XHTML (maybe useful experience as well). If it does cause problems maybe I can filter out the transformation by namespace or some xpath statement.

The weather in the morning was a mixture of cloud and sunny spells. In the afternoon it was still cloudy, but the sun shone for most of the afternoon until probably about 4pm when it clouded over. In the evening it rained a bit.

Food
Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with sweet & crunchy salad sandwich; a few red grapes; banana; min chocoalte sandwich biscuit; cup o' tea.
Dinner: Slice of Ham, mushroom and chicken quiche; slice of tomato, sausage and bacon quiche; potatoes; peas. Pudding was a Mac and Ben cooked Japanese bean pancake thing, which I put some strawberry jam on. Would have been nicer with cream, but we didnae have any. Coffee.
Supper: Oreo; cup o' tea.

No comments: