Back
Issue
Return to home page
Invited article
PDF(819k)
Grech V*. Publishing on the WWW. Part 6 - Simple graphic manipulation. Images Paediatr Cardiol 2002;9:55-68
*
Editor-in-Chief, Images Paediatr Cardiol
 
MeSH
Internet Publishing Medical illustration
Abstract
Modern graphic manipulation software is quick and simple to use, and allows medical quality graphics to be produced for online publication. This article demonstrates, step by step, how submitted images are processed by the journal in preparation for publication.

Article
This article will demonstrate, step by step, how images are processed by Images in Paediatric Cardiology, and made suitable for on-line publishing. I will do this by illustrating with actual work done on graphics that have been published in the Journal. The software used is Paint Shop Pro 7, a graphic manipulation program by JASC software.1 We will start with the graphic as submitted to the journal, and the end result will be a graphic that is suitable for publication online. Such a graphic should be clear, informative and small enough in file size to allow easy download in a web page article at the user end i.e. up to 20K.

Image acquisition
Images are sent to the journal on removable media (usually floppy or CD), or as email attachments. Such images may be sent as separate graphic files or may be embedded in a document, usually in a word processor file such as Microsoft Word, or perhaps as a graph in a spreadsheet.

Stand-alone files may come in one of several formats. The most commonly used format is JPG ('Joint Photographic Experts Group').2 However, up to date graphic editing software will be able to view and modify virtually any of the common (and not so common) file formats. The JPG format employs a compression algorithm that allows files to be reduced in size and thereby become more easily downloadable from the internet. The JPG standard available in the public domain supports sixteen million colours, and hence displays continuous tone images (such as photographs) very well. However, the compression used is lossy, that is, data considered not essential by the compression algorithm is discarded, mostly by averaging pixel values to those pixels in its immediately surroundings. The compression level is under the operator’s control (see below) but excessive compression will result in loss of detail and the creation of artifacts.3 At lower compression levels (approximately <20%), the output image is virtually indistinguishable from the original. A JPG file is processed in the following steps:
 
The original file in JPG format (755 by 708 pixels - 32.8K) is too large in physical dimensions to be shown on this page but can be viewed by clicking on the above link. Figure 1 shows the original graphic resized to fit this page. 
Figure 1: Original graphic resized for the purpose of viewing in this page only
figure 1
 
The file is first converted to a lossless format such as TIF.3,4,5 Saving in this format prevents image degradation due to lossy compression. A link to the TIF file is provided here (figure 2: 755 by 708 pixels - 336.2K). TIF is an acronym for Tag(ged) Image File Format that uses a relatively low level of image compression that is lossless, as evinced by the much larger file size for the same size (in pixels) image.
 
Some scratches are visible and these can be removed with the scratch removal tool as shown in figure 3. 
Figure 3: Scratch removal tool
figure 3
 
Various settings may be employed and the before and after results are shown in the two windows in figure 4. 
Figure 4: Scratch removal dialog box
figure 4
The creation of a file in JPG format results in a variable degree of JPG artifact. This artifact is akin to a halo surrounding the sharp parts of the image, and was produced when the graphic was first created and saved in this format. The artifact should be removed at this stage. The menu steps to remove the JPG artifact are shown in figure 5. 
 
Figure 5: The menu steps to remove the JPG artifact removal
figure 5
The JPG artifact removal dialog box is shown in figure 6. This step incidentally also results in the removal of many of the remaining scratches. 
 
Figure 6: JPG artifact removal dialog box
figure 6
The graphic is now cropped, removing areas that are not useful. Since the overall size will now decrease, the file size will also decrease. The area selection tool button is shown in figure 7 (see arrow). The area of interest is selected (figure 8) and the menu used to crop to the selection (figure 9). The end result is shown in figure 10. 
 
Figure 7: Area selection tool
figure 7
 
 
Figure 8: Clicking and dragging to select area of interest
figure 8
Figure 9: The menu steps to crop the image to the selection
figure 9

 
Figure 10: Smaller graphic after cropping (603 by 587 pixels - 19.3K)
figure 10
 
This graphic is still too large to be seen comfortably on screen at 603 by 587 pixels, and should be resized to 400 by 350 pixels at most (width and height respectively) so as to ensure that the final result will be easily visible on all monitors with screen set resolution down to 640 by 480 pixels. Instructions on screen resolution settings are available in another section of the journal. The image is resized to 360 by 350 pixels by using the menu shown in figure 11
Figure 11: The menu steps to resize the image
figure 11
The image size settings dialog box is shown in figure 12. 
Figure 12: Image resizing dialog box
figure 12
Since this graphic is an x-ray, it should be in a grey scale of colours, shading from absolute white to absolute black. This is easily done by using the colour menu (figure 13). 
 
Figure 13: The menu steps to grey scale an image
figure 13
The result is shown in figure 14. 
 
Figure 14: Grey scaled image
figure 14
 
The x-ray now needs enhancement by adjustments in contrast and brightness. This can be done globally by using the histogram function which alters gamma values.6 An image’s gamma is a measure of its contrast and brightness. By correcting gamma, the two elements are adjusted in unison. The gamma curve has three colour components (red, green and blue) which can also be adjusted separately to remove colour casts. Figure 15 displays how to access this menu. Figure 16 shows the histogram function dialog box. Minimal adjustments result in a huge improvement in contrast and brightness. The finished result is shown in figure 17.
 
Figure 15: The menu steps to access the histogram function box (adjustment of contrast and/or brightness)
figure 15
 
Figure 16: Histogram function dialog box
figure 16
 
Figure 17: Images after contrast and brightness correction
figure 17
 
 
Text displaying journal copyright is now added. The text tool is shown in figure 18 (arrow). This menu brings up the text dialog box (figure 19). The necessary text is typed and formatted and is then moved in the picture to the required site. 
Figure 18: Text tool
figure 18
 
Figure 19: Text tool dialog box
figure 19

All that remains is to output the final graphic for publication purposes. This can be done through the JPG optimiser facility (figure 20), which brings up the optimiser dialog box (figure 21). As can be seen, 14% compression produces a very acceptable final image that is just under 20K in size (figure 22). It is possible to produce JPG images that are progressively encoded i.e. the journal readers’ browsers display the image gradually as it is downloaded, using a series of scans to provide increasingly detailed versions. However, progressive JPG downloading requires more computer memory and is not supported by all web browsers.
 

Figure 20: The menu steps to access the JPG export facility
figure 20
 
Figure 21: JPG optimiser dialog box
figure 21
 
Figure 22: Final image
figure 22

Images on the internet may also be found in a format called GIF (Graphics Interchange Format), and this format is non-lossy.7,8 However, this format only supports a maximum of 256 colours and is therefore used for simple line images or when the image background needs to be kept transparent.3

If the image sent for publication is embedded in a document, the image can be extracted into the graphic manipulation software in one of several ways. It can be selected in the document, and then copied and pasted into the graphic manipulation software. If this is not possible, or if the resultant graphic is suboptimal in quality, then the graphic can be captured by viewing it in the original document, and the entire page then captured by pressing the ‘printscreen’ button on the keyboard. This keypress pastes the entire screen to the clipboard. This large graphic is then pasted into the graphic manipulation software and the actual image only cropped. Yet another option, if available, is to open the original document and to save it in hypertext format. The current versions of Microsoft Office, for example, will readily do this. The resulting web page will have links to freshly created graphics, created from the original graphics embedded in the document. The disadvantage of this option is that no control is available over compression levels etc.

Scanning printed images can produce unwanted patterns (figure 23). The Moiré patterns removal feature can remove this (figure 24).6
 

Figure 23: Original graphic with Moiré pattern
figure 23
 
Figure 24: Moiré pattern removal dialog box showing before and after
figure 24

 

In conclusion, modern graphic manipulation software is quick and simple to use, and allows medical quality graphics to be produced for online publication.

References

  1. JASC software - http://www.jasc.com
  2. Welch TA. A Technique for High Performance Data Compression. IEEE Computer 1984,17;8-19
  3. Grech V. Publishing on the WWW. Part 1 - static graphics. Images Paediatr Cardiol 2000;5:11-18
  4. Maldjian JA, Listerud J. Automated teaching file and slide database for digital images. AJR Am J Roentgenol 2000;175:1249-1251
  5. The Unofficial TIFF Home Page - http://home.earthlink.net/~ritter/tiff/
  6. Zammit P. Publishing on the WWW. Part 3 - Scanning medical images for screen presentation. Images Paediatr Cardiol 2001;6:38-49
  7. Welch TA. A Technique for High Performance Data Compression. IEEE Computer 1984, 17;8-19
  8. Ziv J, Lempel A. A Universal Algorithm for Sequential Data Compression. IEEE Transactions on Information Theory 1977;IT-23, 337-343
 
Contact information
MAGNET 
Dr. Victor Grech
Editor-in-Chief
Images Paediatr Cardiol
Paediatric Department
St. Luke's Hospital
Guardamangia - Malta
victor.e.grech@gov.mt
TopHome
BackIssue
Return to home page
 
www.impaedcard.com