[mcclim-devel] drawing of RGB-IMAGE-DESIGN

Robert Strandh strandh at labri.fr
Mon Dec 14 07:28:10 UTC 2009


Hello,

Marcus Eskilsson writes:
 > I have started a lil' work here on some McCLIM based software and I have run
 > into a bit of an issue.
 > 
 > I'm trying to have a pane with a display-function that displays me an 
 > image I load
 > from a PNM, and this fails for me.
 > 
 > Basically I have (excuse the indentation. thunderbird mail client etc.)
 > 
 > (defmethod pane-display (frame stream)
 >     (draw-design (find-pane-named frame 'foo-pane)
 >                    (climi::make-rgb-image-design
 >                         (image::read-image-file "foo.pnm"))))

This is because there are several, mutually incompatible image
extensions in McCLIM.  When you do (image::read-image-file ...) the
raw data is returned, whereas climi::make-rgb-image design requires an
object of type rgb-image which you create by giving it :width,
:height, and :data initargs. 

Regards,
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------




More information about the mcclim-devel mailing list