obtain an image of a web page?

Discussion in 'Apple' started by paintedjazz, May 4, 2009.

  1. paintedjazz

    paintedjazz Guest

    What Mac software do web developers use to obtain an image of a web

    In Safari 4, Apple uses some technology to display the image of a
    webpage in Top Sites. bit.ly, a website similar to tinyurl.com, uses
    a similar or same technology to display 64x64 icons for "Recent"
    shortened URLs.

    Can this be done with sips? How? If not, does anyone know how they
    do this?

    Thanks a bunch.
    paintedjazz, May 4, 2009
    1. Advertisements

  2. paintedjazz

    Jim Guest

    No need to buy software. You can print the page to a PDF, or use Grab
    to grab a selection, or use <cmd><shift>4 to make your own selection.
    Jim, May 4, 2009
    1. Advertisements

  3. paintedjazz

    paintedjazz Guest

    Thanks but that's not quite what I want. If you look at bit.ly or Top
    Sites in Safari 4, they obtain the image of the webpage on the fly.
    Your solution is a completely interactive solution. I appreciate your
    effort though.
    paintedjazz, May 4, 2009
  4. paintedjazz

    paintedjazz Guest

    /usr/bin/screencapture on the Mac can capture the image of the screen
    but I have found no way of capturing the image of the currently
    displayed webpage or even a specified URL that is not interactive.

    For example:
    screencapture -i /tmp/myfile.png

    from a shell script will do exactly what command-shift-4 does but both
    are interactive.
    paintedjazz, May 4, 2009
  5. It might help if you said what you're trying to accomplish.
    Michelle Steiner, May 5, 2009
  6. paintedjazz

    JF Mezei Guest

    The way I understood it, he/she/it wants background/batch processing to
    automatically extract web content, process/rasterize it and save it to
    some file in .jpg or whatever format.
    JF Mezei, May 5, 2009
  7. paintedjazz

    Wes Groleau Guest

    What do you mean by interactive?

    Or better yet, what part of "not interactive" explains
    what you are trying to do?
    Wes Groleau, May 5, 2009
  8. paintedjazz

    paintedjazz Guest

    When you do a command-shift-4, you get a crosshair cursor on the
    screen. That's interactive. In a shell script, you could invoke an
    interactive mode but it wouldn't be too productive when one is
    processing hundreds or thousands of images (such as bit.ly is doing).
    Thus, one would want to remain non-interactive and not require user
    input (from the keyboard or other device). This is the standard
    meaning of interactive and non-interactive.

    Thus, I have a shell script. Inside a loop, I construct or read URLs
    and take snapshot pictures of them to display just as Apple does in
    TopSites or bit.ly does on every page they create for "Recent" links.
    paintedjazz, May 5, 2009
  9. How will the script know which pages to snapshot? Where do you want it
    to put them?
    Michelle Steiner, May 5, 2009
  10. http://www.jurisgalang.com/articles/show/SnapUrl

    You owe me about one minute of googling.

    Jochem Huhmann, May 5, 2009
  11. paintedjazz

    paintedjazz Guest

    Awesome!!! Exactly what I was looking for! I thought I was the
    world's best at googling :) (I now surrender that title to you) but
    even the best strike out sometimes. I'll check my googling investment
    strategy to see if I can repay you anytime soon.
    paintedjazz, May 5, 2009
  12. paintedjazz

    Wes Groleau Guest

    while ______________
    open $URL
    screencapture -i $PATH/$DOMAIN-$PAGE.png
    Wes Groleau, May 6, 2009
  13. paintedjazz

    Wes Groleau Guest

    oops, I forgot to change the -i to -S
    Wes Groleau, May 6, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.