Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    69

    convert a bitmap picture into a png one

    Hi,

    I try to convert a bitmap picture into a png one and I have the following error: "Error saving image". Have you an idea ?
    Let's see the called function :

    /* FIRST */
    void CTakePicView::SaveInPng()
    {
    if (iConvertState != EConvertStateReady)
    {
    return;
    }

    iFileSaver->CreateL(KPngFileName, &iPngClipFormat, &iPngCodec, &iPngCodec);
    iConvertState = EConvertStateSaving;
    }


    /* SECOND */
    void CTakePicView::MiuoCreateComplete(TInt aError)
    {
    if (aError == KErrNone)
    {
    TRAPD(err,iFileSaver->ConvertL(*iBitmap));
    if (err != KErrNone)
    {
    MessageBox(_L("Conversion could not be started&quot);
    }
    }
    else
    {
    iConvertState = EConvertStateReady;
    MessageBox(_L("File Could not be created&quot);
    }
    }


    /* THIRD */
    void CTakePicView::MiuoConvertComplete(TInt aError)
    {
    switch (iConvertState)
    {
    case EConvertStateSaving:
    SavingFinished(aError);
    break;

    case EConvertStateNull:

    default:
    ASSERT(FALSE);
    }
    }


    /* AND THEN */
    void CTakePicView::SavingFinished(TInt aError)
    {
    if (aError == KErrNone)
    {
    iConvertState = EConvertStateReady;
    MessageBox(_L("File Saved&quot);
    }
    else
    {
    MessageBox(_L("Error saving image&quot);
    }
    }



    Thanks you for your help.


    Sb

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    271

    RE: convert a bitmap picture into a png one

    Hi,

    The problem is that the image convertor does not support png image format encoding.

    Regards,
    FN Developer Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×