Saving active object frame to file

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all,

    I want to implement the possibility to batch the save of active object frames to files (with a metadata file for image properties).

    I managed to get code working but for some images, the images seem to loose quality or to be aliased although they should not be.

    Code
    WORD imageNumber = (WORD)adPtr->adFrame[nFrame];
    if (LockImageSurface(pObj->roHo.hoAdRunHeader->rhIdAppli, imageNumber, sprite))
    {
    		CImageFilterMgr* pImgMgr = rhPtr->rh4.rh4Mv->mvImgFilterMgr;
    		bool res = ExportImage(pImgMgr, (fullName+".png").c_str(), &sprite, FILTERID_PNG);
    }

    If I use the save image button in the image editor of the active object, it works without problem.

    Did I miss something?

    with extension:
    Please login to see this attachment.
    with image editor:
    Please login to see this attachment.

    Damien

  • Is this an image with alpha-channel in DX11 mode with "pre-multiplied alpha" checked? If so you have to "de-multiply" the image first. The saved image won't be eactly the same as the original image though, because of rounding issues.

    If you want to do that, I'll probably need to send you updated .h and .lib files for the SDK. What SDK do you use for this extension?

  • Merci Yves,

    I changed the property to Direct3D9 and it worked as expected. I did not really need "pre multiplied alpha" and DX11 so it is OK for me. It won't be as generic as it can be but it is good enough for me.

    Damien

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!