User Tag List

Results 1 to 7 of 7

Thread: Save image in ios?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProUnicode Add-on
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,027
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Question Save image in ios?

    Is there a way to save an image in the ios exporter?

    or do we need to create a new extension for this?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleMac Export ModuleUnicode Add-on
    crayzorechos's Avatar
    Join Date
    Feb 2013
    Location
    Russia.
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it possible, but I not test this methods, I know such minimum two methods for this! First method, you can using Active Picture Object and try New picture command > "http://www.yoururl.com" > load image, after loading image, you can using iOS Screen Capture Object and try Capture command > Frame ( or any available commands )!
    Second method like to the first, but just with one different part, you can using Active Object as alternative for Active Picture Object, if you want this! Try and report them, I not check this.

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProUnicode Add-on
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,027
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks, but i've looked for a Way to load online Images with active picture and Save the image (Not full Frame) to device.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleMac Export ModuleUnicode Add-on
    crayzorechos's Avatar
    Join Date
    Feb 2013
    Location
    Russia.
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi StingRay! But this is impossible without special extension for this, I think you can say Anders and maybe his added this function to iOS Runtime. This extension want to many clickers!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,705
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd have to tinker with the extension's files in Xcode. It isn't too difficult to do - I did it with the WebView object so that I could load a PDF file, download it and then cache it so it didn't have to load from a URL each time.

    Just to warn you, it's a very stitched together piece of code (I'm haven't ever learnt to code in C#), but it does work.

    Replace the following in CrunKcpica.m in Xcode (Application > Classes > Extensions > CRunkcpica.m)
    Code:
    -(void)act_LoadPicture:(NSString*)filename{
        UIImage* imageToLoad = [self loadImageFromString:filename];
        if(imageToLoad != nil)
            [self loadUIImage:imageToLoad];
    }
    With:
    Code:
    -(void)act_LoadPicture:(NSString*)filename{
        UIImage* imageToLoad = [self loadImageFromString:filename];
        if(imageToLoad != nil)
            [self loadUIImage:imageToLoad];
        
        // Gets the name of the file from the end of the URL
        NSArray* fileWithExtArray = [filename componentsSeparatedByString: @"/"];
        NSString* URLFileName = (NSString*)[fileWithExtArray lastObject];
        
        // Saves the file
        NSString* fileToSaveTo = URLFileName;
        NSArray* path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
        NSString* documentsDirectory = [path objectAtIndex:0];
        NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:filename]];
        [data writeToFile:[NSString stringWithFormat:@"%@/%@",documentsDirectory,fileToSaveTo] atomically:YES];
    }
    This probably isn't the most efficient way of downloading/saving files (I'm pretty sure it isn't), but it's the way that worked with my app. For some reason the app freezes while the file is downloading. I'm not sure what the fix would be for this, but once the file has downloaded the app will unfreeze and the file will be saved in the documents folder of your app. If I find a fix or a better method, I'll let you know.

  6. #6
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProUnicode Add-on
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,027
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks, this is a Great Solution for now!

  7. #7
    Clicker 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)
    Mystr's Avatar
    Join Date
    May 2014
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am also really interested in loading picture on iOS and I wanted to know if the solution Game_Master proposes is the only one or if another one was being worked on.

Similar Threads

  1. download and save image
    By kiko in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 10th January 2014, 08:56 AM
  2. Best way to save & load image for logbook editor?
    By Ryzla in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 29th December 2013, 05:52 PM
  3. 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
  4. Image Manipulator save as PNG = invisible result
    By Tiles in forum File Archive
    Replies: 2
    Last Post: 16th May 2008, 04:40 PM
  5. Image manipulator save ICO files
    By DJFuego in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th June 2007, 09:56 AM

Posting Permissions

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