anchor.diff:  	   (symbol (string-downcase value))
   	   (number (format nil "~A" value)))
   	 values))
  -    (multiple-value-bind (ok-p gerror)
  -	(%pixbuf-savev pixbuf filename (string-downcase type) keys values)
  -      (unless ok-p
  -	(signal-gerror gerror)))))
  -
  -(defbinding pixbuf-new-from-xpm-data () (referenced pixbuf)
  -  (data (vector string)))
  +    (values keys values)))
  +
  +(defgeneric pixbuf-save (pixbuf dest type &rest options))
  +
  +(defmethod pixbuf-save (pixbuf (filename string) type &rest options)
  +  (multiple-value-bind (ok-p gerror)
  +      (multiple-value-call #'%pixbuf-savev 
  +       pixbuf filename (string-downcase type) 
  +       (%pixbuf-save-options options))
  +    (unless ok-p
  +      (signal-gerror gerror))))
  +
  +(defmethod pixbuf-save (pixbuf (pathname pathname) type &rest options)
  +  (apply #'pixbuf-save pixbuf (namestring (translate-logical-pathname pathname))
  +   type options))
  +
  +(define-callback stream-write-func boolean 
  +    ((data pointer) (length gsize) (gerror pointer) (stream-id pointer-data))
  +  (block stream-write
  +    (handler-case
  +	(let ((stream (find-user-data stream-id)))
  +	  (write-sequence
  +	   (map-c-vector 'vector 'identity data '(unsigned-byte 8) length)
  +	   stream))
  +      (serious-condition (condition)
  +	(gerror-set-in-callback gerror (file-error-domain) 
  +	 (enum-int :failed 'file-error-enum) (princ-to-string condition))
  +	(return-from stream-write nil)))
  +    t))
  +
  +(defbinding %pixbuf-save-to-callbackv (pixbuf stream type keys values) boolean
  +  (pixbuf pixbuf)
  +  (stream-write-func callback)
  +  (stream pointer-data)
  +  (type string)
  +  (keys strings)
  +  (values strings)
  +  (nil (or null gerror) :out))
  +
  +(defmethod pixbuf-save (pixbuf (stream stream) type &rest options)
  +  (let ((stream-id (register-user-data stream)))
  +    (unwind-protect
  +	 (multiple-value-bind (ok-p gerror)
  +	     (multiple-value-call #'%pixbuf-save-to-callbackv
  +	       pixbuf stream-id (string-downcase type) 
  +	       (%pixbuf-save-options options))
  +	   (unless ok-p
  +	     (signal-gerror gerror)))
  +      (destroy-user-data stream-id))))
  +
  +
  +;; (defbinding pixbuf-new-from-xpm-data () (referenced pixbuf)
  +;;   (data (vector string)))
   
   (defbinding %pixbuf-new-subpixbuf () pixbuf ;; or (referenced pixbuf)?
     (pixbuf pixbuf)
  
positive.code:   (red (unsigned 8))
    (green (unsigned 8))
    (blue (unsigned 8)))
  
negative.code:   (values strings)
    (nil (or null gerror) :out))
  
  (defun %pixbuf-save-options (options)
    (let ((keys (make-array 0 :adjustable t :fill-pointer t))
  	(values (make-array 0 :adjustable t :fill-pointer t)))
      (loop 
       for (key value) on options by #'cddr
       do (vector-push-extend (string-downcase key) keys)
          (vector-push-extend 
  	 (etypecase value 
  