Save changes made to a multibitmap

Help
H.Slh
2013-07-23
2013-07-23
  • H.Slh
    H.Slh
    2013-07-23

    hello
    I'm trying to do some changes to a multibitmap tiff file (change the resolution, color depth and compression).
    but when closing, nothing is saved !! and the file keeps its original properties !
    did I miss something ?
    here is my code.
    thank you

    FIMULTIBITMAP multi = FreeImage.OpenMultiBitmap(FREE_IMAGE_FORMAT.FIF_TIFF, strCurFile, false, false, true, FREE_IMAGE_LOAD_FLAGS.DEFAULT);
    int nPages=FreeImage.GetPageCount(multi);
    for (int i = 0; i < nPages; i++)
    {
    FIBITMAP dib = FreeImage.LockPage(multi, i);
    FreeImage.SetResolutionX(dib, 300);
    FreeImage.SetResolutionY(dib, 300);
    FreeImage.UnlockPage(multi, dib, true);
    }
    FreeImage.CloseMultiBitmap(multi, FREE_IMAGE_SAVE_FLAGS.TIFF_CCITTFAX4);

     
    Last edit: H.Slh 2013-07-23