Mailinglist Archive: opensuse-programming (84 mails)

< Previous Next >
Re: [suse-programming-e] How to display binary data in bmp formart
  • From: Jeroen Wijnhout <wijnhout@xxxxxxxxxxxxxx>
  • Date: Fri, 27 Aug 2004 11:39:19 +0200
  • Message-id: <200408271139.19499.wijnhout@xxxxxxxxxxxxxx>
On Friday 27 August 2004 11: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!!

Have a look at:
bool QImage::loadFromData ( const uchar * buf, uint len, const char * format)
bool QImage::loadFromData ( QByteArray buf, const char * format = 0 )
and
QImageIO if you want to define your own image format. Perhaps QImageIO can
detect the image format by itself, otherwise you have to code your own
format.

best,
Jeroen
--
Kile - KDE Integrated LaTeX Editor
http://kile.sourceforge.net

< Previous Next >
References