GithubHelp home page GithubHelp logo

nsgif's People

Contributors

hboon avatar jacobrosenthal avatar khappucino avatar samuelbeek avatar sebyddd avatar smhjsw avatar tonku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nsgif's Issues

Compression

Hi guys,

Great library! Thanks for building this.

I would like to add additional compression to the gifs. It's my understanding that this can be done by reducing the number of colors or increasing redundant patterns along scan lines.

Gifscicle is a command line utility that can compress gifs. Cloudinary is a cloud platform that can do it, too. So I know it's possible but it doesn't look to be easy in Objective-C and Core Graphics.

Does anyone have any advice? Any freelance developers looking for a quick gig?

Gif Conversion creates memory leak.

This small Objective-C library converts videos to animated Gifs. Unfortunately, the library contains a memory leak which fails to release approximately the same amount of memory as the final size of the gif. Eventually this leads to a crash after multiple sequential conversions.

(This is a duplicate of the previous open issue. I have reposted to make a more concise explanation of the problem for the bugbounty)

Support for large number of frames

Hi All

NSGIF is a great tool to convert videos. But I am having issues converting videos to gifs.
Usually, a gif does not need to be too sensitive on FPS. But when I am creating a gif file with frames more a certain number, eg. 100, the app gets crashed very easily. I found the reason is caused by the CGImageDestinationFinalize. When finalizing the images, I can see that it brings all image frames into memory and crashed the app.

Anyone has ideas to deal with large number of frames in conversion?

Black screen issue with AVPlayer when running createGIFfromURL

I have an AVPlayer with a video and when I run the createGIFfromURL block, it I go home while it's working and reopen the app, the AVPlayer turns black. However, after a while, if I come back to the app , the AVPlayer returns to the screen.

Any ideas as to why this is happening and/or how to fix it?

Can you add a progress block?

It costs time when copy images from asset to gif, maybe add a progress block will be better. We could see a progress when converting a long video.

Demo crashes in simulator

Reason : Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Source type 1 not available'

As its not handled while using image picker in simulator

AVFoundationErrorDomain Code=-11832 "Cannot Open"

I'm using GPUImage to process a video and then save it as a Mov file, once the video is processed, it saves correctly to my video library.

UISaveVideoAtPathToSavedPhotosAlbum (pathToMovie, self, @selector(video:didFinishSavingWithError:contextInfo:), NULL);

in the didFinishSavingWithError function take the video URL and try to run it through NSGIF

  • (void)video: (NSString *) videoPath didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo;

    NSURL *fileURL = [NSURL fileURLWithPath:videoPath];
    [NSGIF createGIFfromURL:fileURL withFrameCount:30 delayTime:.010 loopCount:0 completion:^(NSURL *GifURL) {
    NSLog(@"Finished generating GIF: %@", GifURL);
    }];

    if (error) {
    NSLog(@"Error Saving Video To Library: %@", error);
    // Do anything needed to handle the error or display it to the user
    } else {
    NSLog(@"Saved Video To Library:");
    }

}

However I constantly get the following error

Error copying image: Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" UserInfo={NSUnderlyingError=0x12750ed50 {Error Domain=NSOSStatusErrorDomain Code=-12431 "(null)"}, NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open}
2016-03-24 16:06:37.191 PhotoBooth[1123:444110] Error copying image and no previous frames to duplicate

Any idea what is causing this?

GIF not recognised in other app.

Once GIF is created and stored in iPhone Photos, Its not getting recognised as GIF for other apps.
e.g in Twitter app, Saved GIF in Photos not getting recognised as gif. Other GIF which are not created using NSGIF and stored in Photos are recognised.

ImageIO_GIF_Data Memory Leak

I'm seeing about 30mb of memory that is not being released under the category VM: ImageIO_GIF_Data.

Even after deleting the gif the memory remains allocated.

Any advice?

Thank you for your time

screen shot 2016-03-20 at 11 37 11 am

How to release memory?

Hi ,it really helps me a lot.But when I convert a lot times,it takes some memory.I can't free these memory.Can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.