User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: I need a method to save an image file created in my Pixel Art Portraits program.

  1. #1
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need a method to save an image file created in my Pixel Art Portraits program.



    Download: Face Maker 13.mfa

    The MFA of the pre-alpha version is above. It lets you shuffle through the frames of several active objects to create pixel art portraits. Will you please take a look at the code in the attached file, and if I'm doing something nuts with the code, let me know?

    What I really want to know at present is if there's a way to capture the image created by the layered active objects in the portrait and save it as a PNG or something. I need help with this.

    Thanks.

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It depends on how you're exporting your program. If you're just exporting it as an .exe file then you could use the Capture Object to save a selection of the frame as a photo. I don't believe this extension works in any other exporters though.

    Or if they're all preset animations in the actives that make up the face, you can save the animation frame numbers from each of the actives that make up his face and then reconstruct the face with the settings when the game loads again. You can save external data by use of INI or an array.

    Really cool demo by the way. I love the pixel art and colors that you used! Keep it up!

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Wow, very well done!

    For image exporting,
    if you need a flat png image from the bitmap portrait,
    you can use screen capture object (as Sumo said) to take a snapshot of the "picture" area,
    and then:
    "Image manipulator object" (can load image from clipboard and save to .png)
    or "Surface Object" (same capability as above, and lots more)

    These only works on Windows runtime.

  4. #4
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright I implemented saving in the last line. It saves the file name based on the time save was clicked. Is there a simple way to let the user input the same name?

    Download: Face Maker 14 Saving Works.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yeah loads of ways actually
    you could add an edit box and show/hide on need
    (or a string object listening to keyboard input -with keyboard object- maybe more "shapeable" to your pixel art style)

    then simply retrieve that line when saving,
    maybe save only when string length >0
    and clear the string / hide the edit box

    Or for something more canonical,
    you can use the file object
    and popup a file selector screen when button clicked,
    then retrieve resulting path/name from selector in the expression editor

  6. #6
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    Download: Face Maker 23.mfa

    OK, I implement arrays to store all the data. Check it out. I know how to save the file in a few ways now, but I haven't yet decided which I'll go with.

    Take a peek at the code. It should be much better now.

  7. #7
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    Download: Pixel Art Portraits 025.mfa

    I need help with something new. I'm trying to add color controls, but I'm not sure how to cycle one set of pixels through a variety of colors.

    Ideally, I'd let the user input the RGB values for hair and skin themselves, and have only the necessary pixels change to the exact right colors.

    Take a look at the code, and see for yourself, the let me know if you've got any ideas. Thanks.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Not sure what you'd like to do:

    -users inputting RGB values?
    -users selecting from a color palette?
    (both after selecting which face part to affect)

    To have (a little) more freedom you could try using the "replace color" function (under animations menu)
    but you'll need to store first and current color on every change, for every face part,
    in order to replace the currently visible one

  9. #9
    Clicker Fusion 2.5
    Jocastus's Avatar
    Join Date
    Jan 2008
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what I got as of this morning: Pixel Art Portraits 029B.mfa

    Looks like this in action:



    Basically, the hair color is synced with an active object off screen through an array.

    The issue is that it effects the colors of all the undos and not just the current image. I guess it's because color replace effects all instances of an active object. Is that correct?

    Right now only palette presets chosen by me are available. I've yet to decide how I'll implement more diverse color choices, but entering RGB values is a possibility.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    The issue is that it effects the colors of all the undos and not just the current image. I guess it's because color replace effects all instances of an active object. Is that correct?
    Unfortunately yes, the only way to go with this function and undos would be having three different actives,
    and maybe using a qualifier to reference all different actives for shared means.

    Another idea could be loading into two different instances of a surface object the "undos" as images on every face change (same you do for saving, without actually writing to disk)

    But both of these could overcomplicate your code, maybe..


    Out of curiosity, is it the piece of a wider project, or is it a stand-alone tool?
    Very clean work, very good retro design, congrats!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. How do I save a Blit image to an external file?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th January 2011, 01:33 PM
  2. whats the best method to save info+pass it on
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th February 2010, 02:14 PM
  3. using mmf2 to save an image file (preferably jpg)
    By MelliGeorgiou in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 28th September 2006, 05:32 PM
  4. MMF created Program Group creator available?
    By BizClicker in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th September 2006, 09:13 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
  •