Re: sizing a picture on a webpage

  • From: "Humberto Rodriguez" <sub@xxxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sat, 29 May 2010 07:59:12 -0400

I believe it refers to the picture's original size.  Pictures are sized in 
pixels and screens could have different resolutions,, therefore you would 
have to know the resolution of the screen of the visitor in order to resize 
the image in relationship to the screen, which may be possible only using a 
browser-side script, such as Java Script.

I am not sure that if you put the image inside a div that is a certain 
percentage of the screen, the image will adjust proportionally -without 
distortion- to it.

Images sizes are something hard for us blind people to do.  What I normally 
do to display images is to get their size with PHP and then adjust both 
height and width to the percentage required to make them a certain size, 
normally with a width of 640 and a proportionate heighth.  In your case, you 
could make it have a width of 160 and a proportionate height and that way it 
would fit more or less correctly in the most common screen size of 640x480.

I'd be interested in learning more about resizing images, for this is always 
a difficult matter.

Humberto

----- Original Message ----- 
From: "qubit" <lauraeaves@xxxxxxxxx>
To: "bprogramming" <programmingblind@xxxxxxxxxxxxx>
Cc: "bwebbers" <blindwebbers@xxxxxxxxxxxxxxx>
Sent: Friday, May 28, 2010 11:41 PM
Subject: sizing a picture on a webpage


| Hi all --
| I asked this on blindwebbers but no one who knows the answer seems to be
| online there tonight. I am putting up my personal webpage and want to put 
a
| picture on it so that it is sized to fit in a space that occupies 24% ov 
the
| width of the screen. I read about the css and xhtml for images and still
| can't find anywhere that says what the % means when used in the context of
| the height or width of a picture. If I say
|
| <img src="whatever.jpg" height="90" width="110">
|
| I assume the numbers refer to pixels, as according to the spec, it can be
| either pixels or percent. But if I say width="20%" -- what am I saying? 
Does
| that mean 20% of the whole screen? or the immediately enclosing div? or 
25%
| the picture's normal size?
|
| The docs tell you to experiment, which is fine if you can see the outcome.
| I'm trying to do this without sighted help.
| So does anyone have an answer?
| And how do I determine the normal size of this picture?
|
| TIA and happy holidays.
| --le
|
|
| __________
| View the list's information and change your settings at
| //www.freelists.org/list/programmingblind
|
| 

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: