User Tag List

Results 1 to 3 of 3

Thread: Saving active object frame to file

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    conceptgame's Avatar
    Join Date
    Apr 2011
    Location
    Switzerland
    Posts
    776
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Saving active object frame to file

    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:
    Name:  export_with_extensions.png
Views: 46
Size:  3.1 KB
    with image editor:
    Name:  export_with_image_editor.png
Views: 47
Size:  2.7 KB

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,046
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    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?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    conceptgame's Avatar
    Join Date
    Apr 2011
    Location
    Switzerland
    Posts
    776
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    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.

Similar Threads

  1. saving the screen to an active animation frame
    By mobichan in forum Fusion 2.5
    Replies: 14
    Last Post: 24th April 2016, 01:18 PM
  2. saving active object frame to image during runtime?
    By itsa_doozy in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st January 2013, 09:22 AM
  3. [CRASH/Bug] Active in Subapp loading frame from same file
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th November 2012, 02:55 PM
  4. Saving active object positions - Help Needed!
    By Maccally in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 3rd June 2008, 02:44 PM
  5. File object - file selector saving issues
    By Gary_Molton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2006, 08:25 PM

Posting Permissions

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