JasonDavis
JasonDavis

Reputation: 48963

How can a webserver do images like this?

Below is a thumbnail type image that is on a post from http://doctype.com/, if you haven't been on the site yet, it is similar to this site but for css/design stuff and when you post a question you can have it post a screenshot image as well for you of a website url.

Below is one of them I saw, do you think this is something done programmticly?

IF so how would you do this server side?

screenshot
(source: doctype.com)

Upvotes: 4

Views: 263

Answers (3)

Ivan
Ivan

Reputation: 7506

You can achieve this screenshot-in-a-note effect by having a template image of the curled-paperclipped-note (the curled border, the paper clip, the shadow) and a mask for where the screenshot of the site should fit inside the template. Once you get the screenshot you just rotate it slightly and compose it with the template.

To compose it programmatically you could use ImageMagick as sugested by cpharmston.

Here's an alternative of how to compose the two images with PIL and python.

Upvotes: 1

andersonbd1
andersonbd1

Reputation: 5406

Yes, you need to do it programmatically on the server. There are some flash plugins to do it, but I think server side is the way to go. This is how I did it: http://www.guangmingsoft.net/htmlsnapshot/html2image.htm http://www.imagemagick.org/script/index.php

Upvotes: 1

c_harm
c_harm

Reputation:

If it is done programmatically, it likely uses an image processing library. GD and ImageMagick are two of the more popular ones.

Upvotes: 1

Related Questions