	PRO CDSLOGO, LEFT=LEFT, TOP=TOP, SIZE=SIZE
;+
; Project     :	SOHO - CDS
;
; Name        :	CDSLOGO
;
; Purpose     :	Puts a CDS logo in one corner of a PostScript plot
;
; Category    :	CDS, Graphics, Class5
;
; Explanation :	Puts the CDS logo in one corner of a PostScript plot.  The
;		default is to put it in the lower right corner.
;
; Syntax      :	CDSLOGO
;
; Examples    :	A line like the following should be placed near the end of a
;		plot-producing routine.
;
;			IF !D.NAME EQ 'PS' THEN CDSLOGO
;
; Inputs      :	None.
;
; Opt. Inputs :	None.
;
; Outputs     :	None.
;
; Opt. Outputs:	None.
;
; Keywords    :	LEFT	= If set, then the logo is put in the left corner
;			  rather than the right.
;
;		TOP	= If set, then the logo is put in the top corner rather
;			  than the bottom.
;
;		SIZE	= Size to use in displaying the image.  The default
;			  size is 3.
;
; Calls       :	
;
; Common      :	None.
;
; Restrictions:	Should only be used with PostScript output.  Requires that the
;		file cdslogo.png be available somewhere in the IDL path.
;
; Side effects:	Changes the color table.
;
; Prev. Hist. :	None.
;
; History     :	Version 1, 25-Mar-1996, William Thompson, GSFC
;		Version 2, 24-Oct-2000, William Thompson, GSFC
;			Use PNG file instead of GIF file,
;			but only for version 5.4 or above.
;
; Contact     :	WTHOMPSON
;-
;
	ON_ERROR, 2
;
;  Get the size.
;
	IF N_ELEMENTS(SIZE) EQ 0 THEN SIZE = 3
;
;  Read in the GIF or PNG file.
;
	IF !VERSION.RELEASE LT '5.4' THEN BEGIN
	    READ_GIF, FIND_WITH_DEF('cdslogo.gif', !PATH), A, R, G, B
	END ELSE BEGIN
	    A = READ_PNG(FIND_WITH_DEF('cdslogo.png', !PATH), R, G, B)
	ENDELSE
;
	SZ = SIZE(A)
	NX = LONG(SZ(1)*SIZE)
	NY = LONG(SZ(2)*SIZE)
;
;  Determine where to put the image.
;
	IF KEYWORD_SET(LEFT) THEN IX = 0 ELSE IX = !D.X_SIZE - NX
	IF KEYWORD_SET(TOP) THEN IY = !D.Y_SIZE - NY ELSE IY = 0
;
;  Display the logo.
;
	TVLCT, R, G, B
	TV, A, IX, IY, XSIZE=NX, YSIZE=NY, /DEVICE
;
	RETURN
	END
