×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    8

    Image path with the Nokia phone Camera Gallery problem working fine with the simulato

    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
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: Image path with the Nokia phone Camera Gallery problem working fine with the simu

    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
    Join Date
    Oct 2010
    Posts
    8

    Re: Image path with the Nokia phone Camera Gallery problem working fine with the simu

    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
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Image path with the Nokia phone Camera Gallery problem working fine with the simu

    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
    Join Date
    Oct 2010
    Posts
    8

    Re: Image path with the Nokia phone Camera Gallery problem working fine with the simu

    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
    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
  •  
×