Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts

    Capturing a div & exporting to a image

    Hi there

    I have quite a complicated (in my opinion) request.
    I have a div with various information in it such as images and text. I was wondering if it was possible to capture this div (like a screencap) and export it as a image file (eg. png, jpg etc.).

    Cheers and thanks in advance!

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    JavaScript does not have this ability.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Posts
    190
    Thanks
    25
    Thanked 0 Times in 0 Posts
    ok thanks...any idea what i could use?

  • #4
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    if you're looking for a way to do it programmatically, you'd have to get a commercial screencapture utility, find a way to instantiate it through activex, make certain your div is at a certain position in the screen, perform the capture, and store the file... this strikes me as being too complicated for just something to do... if you're running windows, just hit printscreen with the div on the screen, open paint, hit ctrl-v and crop the picture to only contain the div.
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender


  •  

    Posting Permissions

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