Re: (Lisp-HUG) Resolution of Pane -> File Writes (CAPI)
At 07:42 AM 1/30/2014, Paul Tarvydas wrote:
>Get a copy of IrfanView
>
>http://www.irfanview.com/
>
>and see if it can do it.
Thank You Paul for the suggestion.
Best that I can tell, the pixels/inch(cm) resolution of a CAPI pane
is hardwired to reflect the physical pixels/inch(cm) count of the LCD
monitor connected to your PC itself. You cannot change it.
CAPI has a "Screen" object that is setup at Lisp start time with that
fixed resolution and that is used forever.
The CAPI documentation specifically says that there is exactly one
Screen object when running under Windows.
CL-USER 1 > (setf screen (capi:convert-to-screen))
#<CAPI:COLOR-SCREEN 0 R-SCREEN>
CL-USER 2 > (capi:screen-logical-resolution screen)
96
96
CL-USER 3 >
Therefore, when I create the external file via:
(gp:write-external-image
; Write the WebCam Photo to the File...
(gp:externalize-image video-display-pane
(gp:make-image-from-port
video-display-pane)) output-pathname)
CAPI creates an external file formatted at 96 pixels/inch - and there
is no way to change that.
I did wonder how one deals with, say, 1200bpi printers and the like -
The CAPI printer functions allows one to define a printer as, say,
1200bpi, but, best that I can tell, there is no way to actually
generate 1200bpi data for the printer to print. You actually, in my
case, generate 96 bpi data and that is interpolated etc to fuzz it to
1200dpi for the printer.
I do point out that I am not looking to stretch/contract an image by
changing the pixels or the pixel count - but rather, how to generate
a, say, 300 pixel/inch image that is one-inch on a side rather than a
96 pixel/inch image that is about ~3 inches on a side. The actual
number of pixels and the pixels themselves do not change - it is
simply a change to the pixels/inch parameter in the file header...
It looks like I will have to build an external FLI C++/WIN32/DLL
(Yuck!) thing to do it after the external file has been generated. Double-Yuck!
Regards to the List -
Jack Harper
Secure Outcomes Inc
Evergreen, Colorado USA
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html