User Tools

Site Tools


uploading_image_files

Uploading image files

Motivation

Images often have the ability to convey information (either by themselves or in combination with text, e.g. as to explain where to click in a specific dialog) much better than written information alone. It is thus important to augment articles where necessary with a form of visualization.

Requirements

You should be familiar with the following procedures (briefly explained below):

  • taking screenshots (e.g. for dialog boxes, erroneous data processing results, plot windows, etc.)
  • operating any program (which must be installed) with which images can be (reasonably well) edited
  • grabbing only the “important part” of a screenshot (cropping)
  • potentially converting the image into a different format (preferably PNG, which is loss-less, and doesn't make red lines on gray/white background look so ugly as JPG does)

Instructions

Image creation

The actual set of steps depends on the source of the image:

Matlab figure (non-modal)

If the figure you wish to take a snapshot from is not blocking the console (modal dialogs), you can use the getframe function to grab the figure's content:

% grab the current display of figure with handle f
fr = getframe(f);
 
% save the image (in field cdata) to a PNG file
imwrite(fr.cdata, 'grabbed.png');

Other program window (or modal Matlab figure)

In case the window is not a non-modal Matlab figure, take a screenshot (stored in the operating system's clipboard):

  • on Mac OSX, press CTRL, SHIFT, COMMAND, and the “3” key at the same time
  • on Windows press the “PRNT SCRN” key (on the right side of the F12 key)

Grabbing the essential part

For the screenshot approach (but sometimes also to only show part of a figure), you should be able to load/paste the screenshot into a program (such as PhotoShop, GIMP, etc., usually to paste an image from the clipboard you use COMMAND/CTRL + “v”) and then select the area (marking tool) and only keep the part you would like to show in the article (e.g. in PhotoShop this is done by using the Image → Crop command from the menu).

Make sure to save this cropped version as either an uncompressed image (BMP) or using a loss-less compression (PNG)!

Image upload

While editing the article, press the image upload button (image upload button) located in the toolbar above the article source code area whenever you want to include an image. Please make sure to give the uploaded image a (hopefully) uniquely descriptive filename (without spaces or any other special characters; just use letters, numbers and underscores if necessary).

Once the upload is complete, click the image filename of the newly uploaded image, which will then put the required markup to show the image into the article (at the position you were when you clicked the upload button).

uploading_image_files.txt · Last modified: 2010/05/26 22:45 by jochen