anchor.diff:                                        :tag tag
                                         :field-type field-type
                                         :values values) ifd-entries))
  -               (write-ifd-entry (ifd-entry)
  +               (write-ifd-entry (ifd-entry &key data-relative)
                    (with-accessors ((tag ifd-entry-tag)
                                     (field-type ifd-entry-field-type)
                                     (values ifd-entry-values))
                        ifd-entry
  -                   (write-int-16 stream tag)
  -                   (write-int-16 stream field-type)
  -                   (let* ((field-count (if (sequencep values)
  -                                           (length values)
  -                                           1))
  -                          (field-size (* (field-length field-type)
  -                                         field-count)))
  -                     (write-int-32 stream field-count)
  -
  -                     ;; if the tag is strip-offsets, we need to fix up
  -                     ;; the location of offsets to point to where the
  -                     ;; will actually be, which we only know once we
  -                     ;; start writing out the data.
  +                   (let ((values values))
  +                     (when data-relative
  +                       (setf values (map 'vector
  +                                         (lambda (x) (+ x oiv-pointer))
  +                                         values)))
  +                     (write-int-16 stream tag)
  +                     (write-int-16 stream field-type)
  +                     (let* ((field-count (if (sequencep values)
  +                                             (length values)
  +                                             1))
  +                            (field-size (* (field-length field-type)
  +                                           field-count)))
  +                       (write-int-32 stream field-count)
  +
  +                       ;; if the tag is strip-offsets, we need to fix up
  +                       ;; the location of offsets to point to where the
  +                       ;; will actually be, which we only know once we
  +                       ;; start writing out the data.
                          
  -                     (if (<= field-size 4)
  -                         (progn
  -                           (cond
  -                             ((= field-type +field-type-short+)
  -                              (write-int-16-sequence stream values))
  -                             ((= field-type +field-type-ascii+)
  -                              (error "Can't write inline (<= 4 byte) asciis yet!"))
  -                             ((= field-type +field-type-long+)
  -                              (write-int-32-sequence stream values)))
  -                           (loop for i from field-size below 4
  -                              do (write-byte 0 stream)))
  -                         (progn
  -                           (push ifd-entry out-of-line-ifd-entries)
  -                           (write-int-32 stream oiv-pointer)
  -                           (incf oiv-pointer field-size)
  -                           (when (oddp oiv-pointer)
  -                             (incf oiv-pointer)))))))
  +                       (if (<= field-size 4)
  +                           (progn
  +                             (cond
  +                               ((= field-type +field-type-short+)
  +                                (write-int-16-sequence stream values))
  +                               ((= field-type +field-type-ascii+)
  +                                (error "Can't write inline (<= 4 byte) asciis yet!"))
  +                               ((= field-type +field-type-long+)
  +                                (write-int-32-sequence stream values)))
  +                             (loop for i from field-size below 4
  +                                do (write-byte 0 stream)))
  +                           (progn
  +                             (push ifd-entry out-of-line-ifd-entries)
  +                             (write-int-32 stream oiv-pointer)
  +                             (incf oiv-pointer field-size)
  +                             (when (oddp oiv-pointer)
  +                               (incf oiv-pointer))))))))
                  (write-out-of-line-data (ifd-entry &key data-relative)
                    (with-accessors ((tag ifd-entry-tag)
                                     (field-type ifd-entry-field-type)
  
positive.code: 
  (defun read-image (stream ifd)
    (let ((photometric-interpretation
           (get-ifd-value ifd +photometric-interpretation-tag+)))
      (ecase photometric-interpretation
        ((0 1) (read-grayscale-image stream ifd photometric-interpretation))
        (2 (read-rgb-image stream ifd)))))
  
  (defun read-tiff-stream (stream)
  
negative.code:                           (16
                             (error "Not yet!"))))))))))))))
  
  (defun read-rgb-image (stream ifd)
    (let ((image-width (get-ifd-value ifd +image-width-tag+))
          (image-length (get-ifd-value ifd +image-length-tag+))
          (samples-per-pixel (get-ifd-value ifd +samples-per-pixel-tag+))
          (bits-per-sample (get-ifd-values ifd +bits-per-sample-tag+))
          (rows-per-strip (get-ifd-value ifd +rows-per-strip-tag+))
          (strip-offsets (ensure-vector (get-ifd-values ifd +strip-offsets-tag+)))
          (strip-byte-counts (ensure-vector (get-ifd-values ifd +strip-byte-counts-tag+)))
          (compression (get-ifd-value ifd +compression-tag+))
          (planar-configuration (get-ifd-value ifd +planar-configuration-tag+))
          (predictor (get-ifd-value ifd +predictor-tag+)))
      (declare (ignore planar-configuration))
      ;; FIXME
      ;; 1. we need to support predictors for lzw encoded images.
      ;; 2. Presumably we'll want planar images as well at some point.
      (let* ((bytes-per-pixel
              (* samples-per-pixel
  