[Pal-devel] Screen Capture Function

Tomi Neste flatlander at yellow-hut.com
Fri Sep 7 07:45:49 UTC 2007


GP lisper <fph at clouddancer.com> kirjoitti Fri, 07 Sep 2007 01:16:17 +0300:

>
> Hi, I saw the announcement for PAL, but only now can I spend some time
> on it.  I would be interested in being able to get a framebuffer
> capture without needing an external third party program (or anyone
> present at the keyboard).  A quick look over the html manual doesn't
> show a heading with that capability, anything planned?  Seems like
> some of the graphical state functions could be `adjusted to this
> feature.
>
> TIA
> r
>
> _______________________________________________
> Pal-devel mailing list
> Pal-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/pal-devel

Currently there is not any functionality to do it directly, but it should  
be possible with the SCREEN-TO-ARRAY(1) (not mentioned in the "manual"  
since it is badly out of date at the moment... look at  
examples/images.lisp) function. You'll just need the code to export the  
image in the desired format.
Having an array-to-<format> would be nice but I'm not yet sure how to  
implement it. It would probably be best to use some other cl library to do  
the exporting instead of reinventing the wheel but I dont like the idea of  
adding library dependancies without a good reason.


(1)(SCREEN-TO-ARRAY pos-vector width height) returns a region of the  
backbuffer as an 2d array of (r g b a) lists. Let me know if you try it  
and have any problems since it is not that well tested yet.

-- 
tomppa



More information about the pal-devel mailing list