Active Topics

 


Reply
Thread Tools
Posts: 45 | Thanked: 15 times | Joined on Nov 2009 @ Barcelona, Spain
#1
Hi

I'm writting an app based in qt 4.6.1 ( not 4.6.2 yet )
and I'm having trouble when trying to load jpeg files from Qt, actually
when I query for the supported image formats in the n900 i get the following:

("bmp", "pbm", "pgm", "png", "ppm", "xbm", "xpm")

The code to query is :


qDebug() << QImageReader::supportedImageFormats();

and I'm loading the pixmap with

QByteArray data = reply->readAll();
QPixmap pix;

qDebug() << QImageReader::supportedImageFormats();

if ( pix.loadFromData(data,""))//extension_.toLatin1().data()) )
{
icon_ = QIcon(pix);
}

It works fine for pngs but not in jpeg. It works fine in the emulator of the sdk or with the same sources compiles in windows.

Do I need to do something to create a QPixmap from jpeg in the N900?

Regards
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#2
not sure how helpful this will be, but..

I found recently that when deploying a (4.6.2) qt app onto windows, to get jpeg support I needed to include an 'imageformats' subdirectory from where the qt runtime dlls directory was, with the jpeg dll in it.

I would try googling on qt, jpeg, mageformats, to see if an analogous procedure is needed for the N900.

Last edited by kwotski; 2010-03-14 at 18:42.
 

The Following 2 Users Say Thank You to kwotski For This Useful Post:
Posts: 45 | Thanked: 15 times | Joined on Nov 2009 @ Barcelona, Spain
#3
found it. some file formats are plugins to qt,

As I'm deplotying manually the so files for Qt 4.6 i needed to deploy plugins/imageformats also to the device and export QT_PLUGIN_PATH
 

The Following 2 Users Say Thank You to cnavarro For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:41.