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
steven.v...@asdi.com
www.asdi.com

-----Original Message-----
From: Greg Haerr [mailto:g...@censoft.com]
Sent: Thursday, January 28, 2010 10:42 AM
To: Steven Vahl; nanogui@linuxhacker.org
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: nanogui-unsubscr...@linuxhacker.org
For additional commands, e-mail: nanogui-h...@linuxhacker.org

Reply via email to