Google
Official Google Earth Download Site

Google Earth Community

Support and Answers >> KML Discussions (read only)

Jump to first unread post. Pages: 1
xailor
Tourist


Reged: 11/02/06
Posts: 15
CDATA <img> tags not displaying dynamic images?
      #845540 - 03/26/07 10:37 AM

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.


Post Extras: Print Post   Remind Me!   Report this Post  
tekgergedanModerator
Master Guide


Reged: 09/25/05
Posts: 8028
Loc: Turkey GMT+2
Re: CDATA <img> tags not displaying dynamic images? [Re: xailor]
      #845615 - 03/26/07 12:25 PM

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.

--------------------
...::: | | | Install 4.3 and be aware you can switch back | | | :::...
...::: | | | what you are is what you eat and what you think | | | :::...
...::: | | | if you want to get something, first look and ask for its very details | | | :::...


Post Extras: Print Post   Remind Me!   Report this Post  
xailor
Tourist


Reged: 11/02/06
Posts: 15
Re: CDATA <img> tags not displaying dynamic images [Re: tekgergedan]
      #845708 - 03/26/07 01:55 PM

Quote:

jj=.jpg">




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

Thanks so much.


Post Extras: Print Post   Remind Me!   Report this Post  
tekgergedanModerator
Master Guide


Reged: 09/25/05
Posts: 8028
Loc: Turkey GMT+2
Re: CDATA <img> tags not displaying dynamic images [Re: xailor]
      #846472 - 03/27/07 08:39 AM

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

Have fun

--------------------
...::: | | | Install 4.3 and be aware you can switch back | | | :::...
...::: | | | what you are is what you eat and what you think | | | :::...
...::: | | | if you want to get something, first look and ask for its very details | | | :::...


Post Extras: Print Post   Remind Me!   Report this Post  
xailor
Tourist


Reged: 11/02/06
Posts: 15
Re: CDATA <img> tags not displaying dynamic images [Re: tekgergedan]
      #846509 - 03/27/07 09:23 AM

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.

Post Extras: Print Post   Remind Me!   Report this Post  
Pages: 1




Extra information
0 registered and 9 anonymous users are browsing this forum.

Moderator:  Hill, Jumble, jrohlf, Kempster, mcshea98, jeffryv, dulce, esterrett, regionator, NormB, Frank_McVey, geus, ZeroDeeFeX, LaBelleTerre, vagabondsailor, SupersonicBuddha, DWebb, BeadieJay, TheLedge, Cyclonic, no_stranger, LuciaM, tekgergedan, ManoM, cantarell, toponym2006, Noisette, danescombe, Michal_Drewniak, mutex, marinerfan, Delta102, bebop 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 7251

Rate this topic

Jump to

earth.google.com    bbs.keyhole.com

*
UBB.threads™ 6.5.1.1