[Qt-interest] load jpg files
Yuvaraj R
yuvaraj at ongobiz.com
Tue Sep 1 15:48:11 CEST 2009
when i was faced this this type of issues, From there i have been using the
png formats only..
But we have to know the reason,why it is not supporting..
apart from resource file, if u give the jpg image file path to label,it will
work.
qjpeg4.dll support jpg images.
C:\Qt\2009.01\qt\plugins\imageformats
Thanks
Yuvaraj Ragupathi
On Tue, Sep 1, 2009 at 7:00 PM, Patric <userqt at gmail.com> wrote:
> I also had problems with jpeg files. I was able to upload them into my
> application, and use them actually, but only from machine with QT installed
> on it.
> I realized this when I created installation package and tried to run my
> program on different machine. I did not figured out why it's not working
> with jpeg files.
>
> Try to use png instead of jpeg.
>
> Regards,
> Patric
>
> ----- Original Message -----
> *From:* Yuvaraj R <yuvaraj at ongobiz.com>
> *To:* Eirik Ulvik <eiriku at simsurgery.com>
> *Cc:* qt-interest at trolltech.com
> *Sent:* Tuesday, September 01, 2009 4:24 PM
> *Subject:* Re: [Qt-interest] load jpg files
>
> Eirik
>
> I too faced same issue.
>
> if we load the jpg file to resource files.. we are not able to use it .Why
> ?
>
> Can u please explain us ?
>
> Thanks
>
> Yuvaraj Ragupathi
>
>
> On Tue, Sep 1, 2009 at 1:59 PM, Eirik Ulvik <eiriku at simsurgery.com> wrote:
>
>>
>>
>> RPREMANAND RPREMANAND skrev:
>>
>>
>> Hi,
>> I tried to load JPEG files in my application using
>> void paintEvent(QPainterEvent * event){
>> QImage *img= new QImage(tr("/images/16.jp"),Qt::Format_RGB32);
>> QPixmap *pmp=new QPixmap(tr("/images/16.jpg")) ;
>> QPainter p(this);
>>
>> p.drawPixmap(0,0,50,50,*pmp );
>>
>> }
>> I also used img->load(tr("/images/16.jpg"))
>> pmp->load(tr("/images/16.jpg"));
>>
>> i also did
>>
>> drawImage(img);
>>
>> Im unable to embed the resource in my application.
>>
>> I faced failure in all my attempts .
>> Pls help in this.
>>
>>
>> Thanks in advance,
>>
>> Premanand Rangasamy.
>> --
>> Prem
>>
>> ------------------------------
>>
>> _______________________________________________
>> Qt-interest mailing listQt-interest at trolltech.comhttp://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>> If the images are resources you should use the resurces string format eg.
>> ":/images/16.jpg".
>>
>> Eirik
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090901/4280074e/attachment.html
More information about the Qt-interest-old
mailing list