NSString *input = [[NSBundle mainBundle] pathForResource:@"meme" ofType:@"gif"];
NSString *dirtail = [NSString stringWithFormat:@"%@",@"/Documents/Images"];
NSString *dirfull = [NSHomeDirectory() stringByAppendingPathComponent:dirtail];
if (![[NSFileManager defaultManager] fileExistsAtPath:dirfull]) {
[[NSFileManager defaultManager] createDirectoryAtPath:dirfull withIntermediateDirectories:YES attributes:nil error:nil];
}
NSString *outpath = [[dirfull stringByAppendingPathComponent:@"meme2"] stringByAppendingPathExtension:@"gif"];
NSLog(@"out path :%@",outpath);
GIFCompressionResult re = [GIFCompression compressGIFWithLossyLevel:80 inputPath:input outputPath:outpath];
NSLog(@"end result : %d",(long)re);
levinXiao/GIFLossyCompress
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A GIF lossy compress iOS framework 一个简单易用的gif有损压缩库
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published