PDA

View Full Version : *Automatically Fitting JPG Width Wise On A Open Window*



Anurag Agarwal
02-11-2006, 02:03 PM
I have many high resolution jpg graphic files depicting technical details.
I want to detect screen resolution and open window size and fit graphic file width wise to maximum.
Then I want viewer to be able to scroll it vertically at will.
If user changes window size or screen resoluion then I want graphic file to be displayed as described above.
Will it be possible to scroll it down slowly at readable speed automatically?
Kindly help as I am not very much conversant with Scripting.

Regards,
:)

Twey
02-11-2006, 02:17 PM
The browser will do this automatically. Just link to the JPEG itself rather than a page containing it.

Anurag Agarwal
02-11-2006, 04:48 PM
The browser will do this automatically. Just link to the JPEG itself rather than a page containing it.
Dear Professor Twey,

Thank you very much for the prompt attention to my problem.
When you try to point to Jpg file it automatically fits the window but if length is more than width then width becomes less to allow full length on window.
What I wanted was to fit the file width wise irrespective of width and height ratios.
As a matter of fact my most of the Jpgs are 1275 (width)x2000 (height) pixels.

Regards,

Anurag Agarwal

Twey
02-11-2006, 04:54 PM
I see. OK. Try something like this:

<img src="file.jpg" style="width:100%;height:100%;" />

Anurag Agarwal
02-11-2006, 05:51 PM
I see. OK. Try something like this:

<img src="file.jpg" style="width:100%;height:100%;" />
Dear Professor Twey,

Thank you very much for the help.
<img src="Image.jpg" style="width:100%">
worked like dream.
Can I give you one more trouble?
Will it be possible to scroll it down slowly at readable speed automatically?

Regards,
Anurag Agarwal