xailor
(Tourist)
03/26/07 10:37 AM
CDATA <img> tags not displaying dynamic images?

I have a simple KML document that contains <img> tags within a CDATA <description> block. If I reference a static image, the images show just fine.

We however have a dynamic resize script that scales the image accordingly. Thus, a JPEG image URL may look like Code:
<img src="http://foo.com/bar/image.cgi?id=9&w=320&h=240&q=40">


That specifies to render the image in 320x240 with a JPEG quality of 40 (out of 100). This URL returns the Content-Type: image/jpeg and Content-Length headers exactly as it's static counterpart.

Can anyone speculate why these dynamic image URLs will dispaly a small blank gray box instead of the image? The HTTP access_log clearly shows GE retrieving the resource with expected # of byes, alas no display. I'm stumped on this one. Extracting the image to a static resource is undesirable.

And BTW, these images display perfectly fine and normal in various browser windows.


tekgergedan
(Master Guide)
03/26/07 12:25 PM
Re: CDATA <img> tags not displaying dynamic images?

Hi

Try this discovered by barry:
<img src="http://foo.com/bar/image.cgi?id=9&w=320&h=240&q=40&jj=.jpg">

I dont remember in which cases, but the trick works in some.

If it does not work, I'd rater use an asp or php file as an intermediate script to produce and echo the sizes into the description.


xailor
(Tourist)
03/26/07 01:55 PM
Re: CDATA <img> tags not displaying dynamic images

Quote:

jj=.jpg">




Wow! Works like a champ. Gotta love this board.

Thanks so much.


tekgergedan
(Master Guide)
03/27/07 08:39 AM
Re: CDATA <img> tags not displaying dynamic images

jj is not necessary. Can be something else. I just concocted it.

Have fun


xailor
(Tourist)
03/27/07 09:23 AM
Re: CDATA <img> tags not displaying dynamic images

True, I'm guessing GE erroneously looks for the URL to end in a .jpg or .jpeg string instead of properly examining the HTTP headers for the content type.


earth.google.com    bbs.keyhole.com

*
UBB.threads™ 6.5.1.1