Mailinglist Archive: opensuse-programming (84 mails)
| < Previous | Next > |
Re: [suse-programming-e] How to display binary data in bmp formart
- From: Colin Carter <colincarter@xxxxxxxxxxxxx>
- Date: Fri, 27 Aug 2004 11:20:10 GMT
- Message-id: <d3a6b0f5.766543c1.81ee700@xxxxxxxxxxxxxxxxxxxx>
Derek,
(I hope that I have replied in the correct way.)
An X-Window book I have describes how to set up an icon thus:
#define IWidth 64
#define Iheight 64
static char Ibits[] = {
0x00, 0x00, ..........etc
0x04, 0x01, etc
etc
};
PixMap IPixMap;
And then creates the image as
IPixMap = XCreateBitmapFromData( theDisplay,
theNewWindow,
Ibits,
IWidth,
Iheight );
You could write your own data into the char variable and use
the above converter.
I am a raw beginner, so I don't know if this helps, but it
the way an old fashioned programmer would do it.
Regards,
Colin
(I hope that I have replied in the correct way.)
An X-Window book I have describes how to set up an icon thus:
#define IWidth 64
#define Iheight 64
static char Ibits[] = {
0x00, 0x00, ..........etc
0x04, 0x01, etc
etc
};
PixMap IPixMap;
And then creates the image as
IPixMap = XCreateBitmapFromData( theDisplay,
theNewWindow,
Ibits,
IWidth,
Iheight );
You could write your own data into the char variable and use
the above converter.
I am a raw beginner, so I don't know if this helps, but it
the way an old fashioned programmer would do it.
Regards,
Colin
--- Begin Message ---On Friday 27 August 2004 15:20, j d wrote:
- From: Derek Fountain <derekfountain@xxxxxxxxxxx>
- Date: Fri, 27 Aug 2004 16:14:47 +0800
- Message-id: <200408271614.47841.derekfountain@xxxxxxxxxxx>
> Hi,
>
> Am using suse9.1, kernel-2.6.4, my task is to display
> an image(preferbly bmp format) from binary data read
> by some sensors, using QT.am suing QT-3.3.1.
Not really! You're a bit vague...
If you have an image in BMP format (or almost any other popular format for
that matter) you can display it quite easily. Crib some code from the
"showimg" example in the qt3-examples package.
--
> eatapple
core dump
--
To unsubscribe, email: suse-programming-e-unsubscribe@xxxxxxxx
For additional commands, email: suse-programming-e-help@xxxxxxxx
Archives can be found at: http://lists.suse.com/archive/suse-programming-e
--- End Message ---
| < Previous | Next > |