Function: eudc-bob-display-jpeg

eudc-bob-display-jpeg is a byte-compiled function defined in eudc-bob.el.gz.

Signature

(eudc-bob-display-jpeg DATA INLINE)

Documentation

Display the JPEG DATA at point.

If INLINE is non-nil, try to inline the image otherwise simply display a button.

Source Code

;; Defined in /usr/src/emacs/lisp/net/eudc-bob.el.gz
(defun eudc-bob-display-jpeg (data inline)
  "Display the JPEG DATA at point.
If INLINE is non-nil, try to inline the image otherwise simply
display a button."
  (cond ((fboundp 'make-glyph)
	 (let ((glyph (if (eudc-bob-can-display-inline-images)
			  (make-glyph (list (vector 'jpeg :data data)
					    [string :data "[JPEG Picture]"])))))
	   (eudc-bob-make-button "[JPEG Picture]"
				 eudc-bob-image-keymap
				 eudc-bob-image-menu
				 (list 'glyph glyph
				       'end-glyph (if inline glyph)
				       'duplicable t
				       'invisible inline
                                       'object-data data))))
	((fboundp 'create-image)
	 (let* ((image (create-image data nil t))
		(props (list 'object-data data 'eudc-image image)))
	   (when (and inline (image-type-available-p 'jpeg))
	     (setq props (nconc (list 'display image) props)))
	   (eudc-bob-make-button "[Picture]"
				 eudc-bob-image-keymap
				 eudc-bob-image-menu
				 props)))))