Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: For Those On The Cutting Edge Of Web Design

  • Subject: Re: For Those On The Cutting Edge Of Web Design
  • From: Roy Schestowitz <newsgroups@schestowitz.com>
  • Date: Mon, 27 Jun 2005 07:07:39 +0100
  • Followup-to: alt.2600,alt.html,alt.php
  • Newsgroups: alt.2600, alt.html, alt.php
  • Organization: schestowitz.com / Manchester University
  • References: <attub1tqhra0hs0mg2ia5j32bg3hkjgnec@4ax.com>
  • Reply-to: newsgroups@schestowitz.com
  • User-agent: KNode/0.7.2
Enthusiastic Onideus Mad Hatter composed this uninvited self-promotion:

> I contributed my thoughts to the only article in existence (as far as
> Google can find) regarding liquid images:
> http://www.michelf.com/weblog/2005/liquid-image/
> 
> He, he, he...it seems that once again I have made web design history.
> 
> For those who aren't retarded like Starshine Moonbeam aka MORONbeam,
> here's teh actual code segments:
> 
> HTML File
> :<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Fuzzy"
> :"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> :  <html>
> :    <head>
> :      <title>Histology Tutorial</title>
> :      <meta http-equiv="Content-Type" content="text/html;
> :      charset=windows-1252"/> <meta http-equiv="imagetoolbar"
> :      content="no"/> <meta name="keywords" content="Backwater
> :      Productions, histology, WWCC, Walla Walla"/> <meta name="language"
> :      content="en-us"/> <meta name="distribution" content="GLOBAL"/>
> :      <meta name="copyright" content="Backwater Productions 2005"/>
> :      <meta name="author" content="Backwater Productions"/>
> :    </head>
> :    <body style="margin-left:0; margin-top:0; margin-right:0">
> :      <script language="JavaScript" type="text/javascript"
> :      src="internals.js"></script>
> :    </body>
> :  </html>
> 
> JavaScript File
> : document.cookie = "farfoos=" + document.body.clientWidth;
> : document.write("<img src='index.php'>");
> 
> PHP File
> :<?php
> :
> :$filename = 'shapes.png';
> :
> :list($width, $height) = getimagesize($filename);
> :$new_width = $HTTP_COOKIE_VARS["farfoos"];
> :$new_height = $height / $width * $new_width;
> :
> :$image_p = imagecreatetruecolor($new_width, $new_height);
> :$image = imagecreatefrompng($filename);
> :imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height,
> :$width, $height);
> :
> :imagepng($image_p);
> :?>

I thought this would be a handy tool, for example, when embedding images in
an S5 presentation (see for example
http://www.schestowitz.com/Research/Presentations/April_2005)

The text in principle adapts in size to accommodate the screen nicely, but
images do not. Using your 2-line simplistic trick, which quite frankly,
somebody must have deployed already, one would still need to add an element
to warp the image. So it can be a pain that's not trivial or quick to add.

Roy

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index