Browse Prior Art Database

Automatic Best Resolution / Colour Web Image

IP.com Disclosure Number: IPCOM000014303D
Original Publication Date: 2001-Jan-01
Included in the Prior Art Database: 2003-Jun-19
Document File: 2 page(s) / 41K

Publishing Venue

IBM

Abstract

Automatic Best Resolution Colour Web Image Disclosed is a system for automatically loading an image file in a web page which best matches the user's screen size and display colour depth. The system detects the size of the window within the user's browser into which the image is to be loaded, and the colour depth the user is running in. It then directs the client's web browser to load a specific image file off the web server which will fit into this size and is of this colour depth.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 93% of the total text.

Page 1 of 2

Automatic Best Resolution / Colour Web Image

Disclosed is a system for automatically loading an image file in a web page which best matches the user's screen size and display colour depth. The system detects the size of the window within the user's browser into which the image is to be loaded, and the colour depth the user is running in. It then directs the client's web browser to load a specific image file off the web server which will fit into this size and is of this colour depth.

     The system has been implemented using javascript. The javascript accesses the browser variables which contain window size and colour depth, and then looks up the appropriate image in an array. It then writes out an image tag to the document dynamically which refers to the best-match image. The images are named "test<image width><colour depth>.<image format>" where <image width> is taken from the imageWid array, the format matches colour depth; "png" for 16 bit and "gif" for 8 bit. An example is "test82516.png" for a png image, colour depth 16 bits of size 825 x 637 pixels.

<body> <script language="JavaScript1.2"> <!--

imageWid = new Array("825","630","442","282");

imageHei = new Array("637","487","342","216");

if( screen.pixelDepth >= 16 )

{

pdepth = "16.png";

}

else

{

pdepth = "8.gif";

}

// write image tag depending on window width

for( i=0; i<imageWid.length; i++)

{

if( window.innerWidth > imageWid[i] )

{

document.write('<img src="test'+imageWid[i]+pdepth+'" width='+imageWid[i]+' h...