User Tag List

Results 1 to 9 of 9

Thread: Embedding and Modifying Images

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Embedding and Modifying Images

    I'm designing a program where I want the images to be imbedded in the exe. I don't want the images to be extracted upon running of the program. Basically, I want an image embedded in to the exe to be able to be modified and then exported. When I say exported I mean something as simple as saving it as an image file. My main concern is that I don't want the user to have access to the unmodified version of the image. This is why I was thinking of somehow embedding the image.

    I know about Data Elements and Binary Files, however, I have trouble accessing them. When I want to load them I go to the Special Object, Binary File, then Extract Binary. It asks for a location. Is it asking where I want to file to be extracted to? If I try this via expression editor then I go to Special Object > Filenames > Binary file temporary filename. I get: ""BinFileTempName$(> Enter string here < ). What do I put to replace the part of >Enter string here <?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems Binary Data works completely different than you think. I write down something useful I came across:


    • As you know - you have to add a file in the Data Elements window > Binary Data
    • The one column of the Binary Data listed below is titled "Name" because the path of the added file will act like an ID or Name the whole time you want to use it in your code. So if you add "C:\folder\file.ext" then in the built EXE file "C:\folder\file.ext" dosn't exist anymore as external file. From now on "C:\folder\file.ext" is the ID or Name of the file you added to Binary Data at edit time before building the application.
    • Some (Clickteam) objects/extensions are able to load embedded files without extracting them just using the ID "C:\folder\file.ext".
    • The action Extract binary file wants to know which file you want to extract, put in the ID "C:\folder\file.ext". The file will be extracted in the temporary application folder with an cryptic name.
    • With the expression BinFileTempName$( "C:\folder\file.ext" ) you can get the right file of these cryptic files (path names) to load for your objects/extensions.
    • Everytime you use Extract binary file 1 will be added to an usage counter of the used ID. Everytime you use Release binary file 1 will be subtracted from this usage counter of the used ID. So if you extract the file two times the file only will be deleted again if you release it two times or the application ends.
    • Here is the official Tutorial: A Guide to using Binary Data (Windows / Exporters)


    It's a little bit confusing the first time but I hope it helps. This topic pops up every month and should really get simplified in Fusion 3.

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the response. I got it to display an embedded image. However, I do find it a bit cumbersome. I would love to be able to assign "names" to each binary data item. I also use another RAD tool called Neobook. That's one feature that you can assign to any data. That is, you can assign a name to data/object. Much easier to reference when using the scripting language.

    With Fusion 2.5 it would be nice to be able to give a name to each data such as [Data1] and so forth. Then, to call it you'd just use the reference of [Data1]. I think it's quite odd to have it named via the source file location.

    My only issue now is trying to modify the image by adding text to it. I'm thinking of creating a new frame, putting the image in it. Then creating a new object (i.e. text for each object) and placing it on the image via XY coordinates. Have the program quickly jump to the frame with the image and text object and take a screenshot of it quickly using the Screen Capture object then have it jump back to the original frame. Thus far, that's about the only way I can think of dynamically adding text to an image.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should have a look at the Surface object you can find in the Extension Manager.
    It's a extensive extension for image manipulation (also invisible in the background and also adding text is possible).

  5. #5
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow! Thanks! I never knew of this extension. It does so much. I'll have to play around with the blitting function to get the hang of handling adding text. I also like that it supports adding images and affecting the transparency. I'll have it create a translucent watermark on all images saved with the unregistered version.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the Surface object that's no problem. There are some very useful examples in your Fusion folder.

  7. #7
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked the Examples folder. I don't see any examples for the Surface extension.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, sorry. They were provided in a separated download but unfortunately the developers site is down.

    But here you can get the files.

  9. #9
    Clicker Fusion 2.5 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Dec 2009
    Location
    Louisiana, USA
    Posts
    369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome! Thanks a bunch. The example files have an example for the main tasks I'm wanting to complete in my project in regards to image manipulation.

Similar Threads

  1. Modifying depth within a pixel shader?
    By UltimateWalrus in forum Hardware Accelerated Runtime
    Replies: 2
    Last Post: 7th March 2013, 10:59 PM
  2. [Request] Trainer/Memory Modifying extension
    By Fimbul in forum Extension Development
    Replies: 34
    Last Post: 10th February 2010, 01:53 AM
  3. Need help modifying Platform Engine
    By Rich in forum File Archive
    Replies: 6
    Last Post: 5th August 2008, 03:40 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
  •