Results 1 to 5 of 5

Thread: *Automatically Fitting JPG Width Wise On A Open Window*

  1. #1
    Join Date
    Feb 2006
    Location
    India
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile *Automatically Fitting JPG Width Wise On A Open Window*

    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,
    Last edited by Anurag Agarwal; 02-11-2006 at 04:51 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The browser will do this automatically. Just link to the JPEG itself rather than a page containing it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2006
    Location
    India
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    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

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I see. OK. Try something like this:
    Code:
    <img src="file.jpg" style="width:100%;height:100%;" />
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Feb 2006
    Location
    India
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    I see. OK. Try something like this:
    Code:
    <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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •