Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User k.rajanireddy's Avatar
    Join Date
    Oct 2010
    Posts
    8
    Hi ,

    I am trying to send photos from the Nokia N8 phone. When I send from simulator I able to send the photos. But when I try to send from phone ( Symbian) it says the image is empty. I tried the following path to retrieve the images.

    For Example:
    //My image path is
    QString imagePath = "E:\Images\Camera\201103\201103A0\03092011124.jpg"
    QImage image(imagePath);
    if (image.size().isEmpty())
    {
    qDebug()<< "~~~~Qimage is empty";

    }
    I am getting Qimage is empty.

    But If I run with simulator by changing the paths according to the system then I am able to send the same image.
    For Example:
    QString ImagePath = "C:\Users\zubin\Desktop\RajaniWorkingArea\Mosonex\Camera\201012\201012A003092011124.jpg";
    QImage image(imagePath);
    if (image.size().isEmpty())
    {
    qDebug()<< "~~~~Qimage is empty";

    }
    Successfully I am sending the image.

    Any help on this is appreciated.

    Thanks,
    Rajani.

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Your code seems to be Qt, so the thread is moved to the Qt boards.
    I do not know Qt, but those single backslashes are suspicious, and also the absolute path on your hard drive (at least in case of Symbian emulators, there is a private file system, in epoc32\winscw\c as C: drive).

  3. #3
    Registered User k.rajanireddy's Avatar
    Join Date
    Oct 2010
    Posts
    8
    Hi Wizard,

    Thanks for the reply. Can you please send me exact path for the private file system. Because I do not see epoc32/winscw/c.

  4. #4
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    In Qt, don't use "\" for a path separator, except for certain special cases. Use "/" instead.

    If you do use "\" you must double them up to "\\".

  5. #5
    Registered User k.rajanireddy's Avatar
    Join Date
    Oct 2010
    Posts
    8
    Thank you all,

    I figured out the problem. I am using QImageReader before I use QImage in symbian.
    Example:
    QString imagePath = "E:\Images\Camera\201103\201103A0\03092011124.jpg";
    QImageReader image_reader(imagePath);
    if ( image_reader.size().isNull()){
    qDebug()<< "!!!image_reader is null";
    }
    QImage image = image_reader.read();
    if (image.size().isEmpty())
    {
    qDebug()<< "~~~~Qimage is empty";

    }

    QByteArray imageToSend;
    QBuffer* buf = new QBuffer(&imageToSend);
    buf->open(QBuffer::ReadWrite);
    image.save(buf, "JPEG");
    if (buf->size()==0)
    {
    qDebug()<< "!!!!Buffer is empty";
    }
    if (imageToSend.size()==0)
    {
    qDebug()<< "----image to Send is empty";
    }

Similar Threads

  1. Replies: 3
    Last Post: 2010-03-17, 19:36
  2. Replies: 3
    Last Post: 2009-05-13, 14:52
  3. Sending image from phone gallery via mms
    By meghaarya in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2008-04-15, 06:15
  4. Send via gallery working partially problem.
    By Vincenco2 in forum Symbian C++
    Replies: 2
    Last Post: 2007-09-08, 09:09
  5. Path of Gallery\Images folder for Nokia 6682
    By dollyp17 in forum General Development Questions
    Replies: 0
    Last Post: 2006-02-13, 11:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved