nanogui: Thread: Screenshots in Nano-X


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Screenshots in Nano-X
From: Steven Vahl ####@####.####
Date: 27 Jan 2010 18:25:39 -0000
Message-Id: <9F69FF8A3F0CF8449F231D4324DB1B3A1B0812A3E5@EX1.asdi.com>

Hello,

I am using Nano-X on an embedded system with a 320 x 240 display and a four-button keypad.  It order to get screenshots for documentation for the device, I temporarily modified my nano-x keyboard driver so that one of my four buttons gives the MWKEY_PRINT signal, so that the Nano-X server calls the GdCaptureScreen routine and creates a "screen.bmp" file.  However, no bitmap editor I've tried has been able to open any of the screen.bmp files that are created--they all say the file is corrupt.

Any suggestions for fixing this or workarounds for getting the screenshots I need would be appreciated.

Thanks in advance,

Steven Vahl

________________________________
NOTICE: This message (with any attachments) is confidential and may constitute privileged communication, and is intended only for the recipient(s) named herein. If you are not the intended recipient, or a person responsible for delivering this message to the intended recipient, you are hereby notified that any distribution, copying or dissemination of the information herein is strictly prohibited. If you have received this e-mail in error, please contact us immediately by telephone, facsimile, or email, and delete this e-mail from your computer system without retaining a copy.
Subject: Re: [nanogui] Screenshots in Nano-X
From: "Greg Haerr" ####@####.####
Date: 28 Jan 2010 17:42:27 -0000
Message-Id: <096701caa041$40046a30$6664a8c0@winXP>

> I am using Nano-X on an embedded system with a 320 x 240 display and a 
> four-button keypad.

Please describe the MWPF_TRUECOLOR specification for this device,
the .bmp will vary depending upon it.


>  However, no bitmap editor I've tried has been able to open any of the 
> screen.bmp files that are created--they all say the file is corrupt.

Please forward a .bmp to me, along with the spec for the framebuffer
color format.

Take a look at the source in src/engine/devopen.c::GdCaptureScreen()
for more information.

Regards,

Greg 

Subject: RE: [nanogui] Screenshots in Nano-X
From: Steven Vahl ####@####.####
Date: 28 Jan 2010 18:38:41 -0000
Message-Id: <9F69FF8A3F0CF8449F231D4324DB1B3A1B22A2E554@EX1.asdi.com>

I discovered the problem with my corrupt bitmaps.  The cross-compilier I'm using for my embedded system does not support the "#pragma pack()" directive that is used around the declaration of the BMPHEAD structure in the src/engine/devopen.c file.  Consequently, byte-alignment was causing the bitmap header to be written incorrectly.

I fixed the problem by adding "__attribute__((packed))" to the BMPHEAD structure declaration, which is recognized by my compiler.

I also had to make some modifications to the GdCaptureScreen() code (swapping x and y coordinates) to resolve other problems caused by the fact that I am running the nano-X server in "rotated" mode.  (with the -R option.)

Thanks to all who took the time to look into this.


Steven Vahl
Scientific Programmer
ASD Inc.
2555 55th St., Ste. 100
Boulder, CO  80301  USA
(303) 444-6522 ext. 127
####@####.####
www.asdi.com

-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Thursday, January 28, 2010 10:42 AM
To: Steven Vahl; ####@####.####
Subject: Re: [nanogui] Screenshots in Nano-X

> I am using Nano-X on an embedded system with a 320 x 240 display and a
> four-button keypad.

Please describe the MWPF_TRUECOLOR specification for this device, the .bmp will vary depending upon it.


>  However, no bitmap editor I've tried has been able to open any of the
> screen.bmp files that are created--they all say the file is corrupt.

Please forward a .bmp to me, along with the spec for the framebuffer color format.

Take a look at the source in src/engine/devopen.c::GdCaptureScreen()
for more information.

Regards,

Greg


NOTICE: This message (with any attachments) is confidential and may constitute privileged communication, and is intended only for the recipient(s) named herein. If you are not the intended recipient, or a person responsible for delivering this message to the intended recipient, you are hereby notified that any distribution, copying or dissemination of the information herein is strictly prohibited. If you have received this e-mail in error, please contact us immediately by telephone, facsimile, or email, and delete this e-mail from your computer system without retaining a copy.
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.