Results 1 to 2 of 2

Thread: i have a problem with qimage in qt5

  1. #1
    Join Date
    Feb 2012
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default i have a problem with qimage in qt5

    Qt Code:
    1. QImage image;
    2. image.load("/var/project/0x14Server/20132323222329852.gif");
    3.  
    4. QImage imageMain = image.scaled(163,223,Qt::KeepAspectRatio);
    5. if(imageMain.isNull()){
    6. qDebug() << "sss";
    7. }else{
    8. imageMain.save("/var/www/novel/BookImages/2013/01/23/aa.jpg","jpg");
    9. }
    To copy to clipboard, switch view to plain text mode 

    before i using qt5,this code runing with qt4.8 , and there is no problem
    now i using qt5
    i got a message like this : "qimage is a null image" or sometimes program just exit

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: i have a problem with qimage in qt5

    Do you have the gif image plugin installed?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QImage setPixel() problem
    By ugluk in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2013, 15:26
  2. Problem while Transforming a Qimage
    By Schreihals in forum Qt Programming
    Replies: 0
    Last Post: 29th March 2012, 16:49
  3. QImage problem
    By bluetonic in forum Newbie
    Replies: 3
    Last Post: 30th September 2011, 10:15
  4. Problem with pixelIndex in QImage
    By danilodsp in forum Newbie
    Replies: 2
    Last Post: 17th September 2011, 07:14
  5. qImage saving to jpg problem
    By sqarpi in forum Qt Programming
    Replies: 9
    Last Post: 1st September 2010, 16:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.