How to capture images from the screen

Using LView

Frequently in producing web pages, it will be valuable to capture an image displayed on the screen such as a graph, that is not readily saved directly into an image format. Some software will produce an image as part of its output, but then does not readily make possible the rendering of that image directly to a file format that can be used for a web page. This web page offers one method to solve that problem

In this example, we will:

  1. Create a bar graph using Excel.
  2. Use LView to capture the Excel window.
  3. Use LView to crop the image to the size or portion of the window we wish to display.
  4. Save the image in .JPEG format.
  5. Import the image into a web page.


Create a bar graph using Excel

First we need to create a graph using Excel. Open Excel and enter the numbers 1, 2, 3, 4, 5 in cells B1 through B5. It should look like this:

Then block the numbers and click the chart button up in the button bar . (This can also be done by clicking Insert > Chart in the menu.)


Select the defaults to create a very simple bar chart (or column graph as Excel calls it.)



Now that you have created a graph you need to be able to capture it. Click on an empty cell to get rid of the resize buttons on the graph.

Wrong! Correct!



Use LView to capture the Excel window

LView (or LViewPro) is a piece of shareware site licensed at WVU some time ago that makes simple image editing quite easy. Find the program with either the desktop icon or in the c:\LView or c:\Program Files\LView folder.

Open the program, close the registration screen, then switch to Excel by clicking on it in the Task Bar at the bottom of the screen. After centering the graph in the screen, click on a nearby cell. As noted above, this will remove the re-size points on the graph enhancing the image to be captured. Switch back to LView so that Excel becomes the last window opened.

In LView

Click Edit > Crop

Click Edit > Capture > Window

After a short pause of 2-3 seconds, LView will open up a window that is a captured image copy of the Excel window. Note that sometimes it gets confusing because of the fact that there are two menus displayed.


Use LView to crop the image to the size or portion of the window we wish to display

Within LView, use the click and drag feature of the mouse to highlight the area to be cropped into a smaller image. It will be highlighted in red.

If the entire image moves around on you when you try to block it, you will need to click the Crop menu item again first.

Click Edit > Crop

The portion of the image in red will be all that remains of the original image, and it will need to be saved in the appropriate folder for use in the web page.

Save the image in .JPEG format.

To save the cropped image

Click File > Save As

give it a name and then save it in .jpeg format. Saving it in .gif format may also be acceptable. As a general rule-of-thumb, photographs or images with manycolors will save smaller as a .jpg or ,jpeg image, while images such as graphic designs with blocks of solid color will save smaller as .gifs.

Import the image into a web page


Once you have saved the graph as an image, go to your web page (i.e. portfolio.htm), locate the place you wish the image to go, and click the Add Image button . Note that you can also resize the image on the page by right-clicking the image, and selecting the Image Properties menu item.