Mailinglist Archive: opensuse-programming (84 mails)

< Previous Next >
Re: [suse-programming-e] How to display binary data in bmp formart
  • From: Derek Fountain <derekfountain@xxxxxxxxxxx>
  • Date: Fri, 27 Aug 2004 18:02:31 +0800
  • Message-id: <200408271802.31516.derekfountain@xxxxxxxxxxx>
On Friday 27 August 2004 17:32, j d wrote:
> have seen showimg. in that they are simply taking one
> movie and displaying it on the scree, where as in my
> case, i don't have img, i myself need to prepare one
> image by any convertion method, which i don't know,
> and have to display that image on the scree, so
> basically wat i want to say is, i have just binary
> data file, so first with that data i need to make a
> bmp image file and then i have to display it!!

Right, now I understand. :o) You need to create yourself a QPixmap which
allows you to use a QPainter object to draw out the graph and coordinates
which you want to display. You can then convert the QPixmap to something like
a BMP or JPG which you can display on screen in a window.

The interface for doing this sort of thing from Qt is low level, which means
complicated and fiddly! If it's possible for your application, you might do
better to draw your BMP image using Perl (the GD package comes to mind, but
there might be others) then show the image file on screen using Qt.

--
> eatapple
core dump

< Previous Next >