Multi-frame GIFs to clipboard or photos
Webmaster4o last edited by
If you open the gif in the editor, long press on it, and press save image using the native iOS dialog, you can save the whole gif. Save it the same way you would from safari if you saw it online.
Another solution is using an API like pyimgur to upload your GIF to the internet. Then, paste the link into your browser and save it from there.
Gerzer last edited by Gerzer
Do you have the app Workflow by DeskConnect? Also, how many frames are in the GIF?
@Gerzer I do not have Workflow. Number of Frames can be anywhere between 4 and 12 or so.
mmontague last edited by mmontague
@Webmaster4o Thanks for the tips. I can do your first one, but getting back to the editor involves closing the app -- so not quite ideal. Your second idea is interestings... I will look into that.
Gerzer last edited by
Then the solution I had in mind won't work. Oh, well. I'll keep thinking. :)
Gerzer last edited by Gerzer
It would work if you'd be willing to put down some money for Workflow. It's a great app and is quite useful for Pythonista users. I'm not trying to pressure you into buying it, though. Do so only if you want to.
JonB last edited by
Here is a fully functional implementation of MFMailComposeView which lets you precompose an email, and attach a file. Any file type is allowed, although you will need to know the proper mime type name, such as image/gif, or application/zip for emailing zip files, etc. The user chooses to send or cancel from the ios mail composer.
The example main() shows also how this would work if launching from a ui-- you need to use
closebefore displaying the mail controller. you could edit the callback to display it again after dismissing the mail sheet.
@JonB Yes, this looks like an awesome solution. I see it uses the objc_util so I think that means I would need the beta, or else wait for the next release. But I think something like this is the long-term solution. Appreciate it!
Using objc_util, which I really don't understand well at all, and working off examples I've found here and there on this forum, I feel like I almost have it.... just trying to put an animated GIF onto the clipboard so it can be pasted into another app.
Method 1 below (commented out) works, but when the image is pasted it is unfortunately a .PNG.
Method 2 allows you to specify image type. However, this does not seem to work at all. Clipboard is empty.
# coding: utf-8 from objc_util import * UIPasteboard=ObjCClass('UIPasteboard') pb=UIPasteboard.generalPasteboard() #method 1: works but creates a .png: #imgdata = UIImage.imageWithContentsOfFile_('test.gif') #pb.setImage_(imgdata) # method 2: does not work. pasteboard is empty imgdata = NSData.dataWithContentsOfFile_('test.gif') pb.setData_forPasteboardType_(imgdata, ns('kUTTypeGIF'))
omz last edited by omz
Method 2 should work if you use
'com.compuserve.gif'(the UTI for GIF images) instead of
'kUTTypeGIF'. The latter is the name of a constant/macro, it would get replaced by the preprocessor if you were writing actual Objective-C code.
I've tested this with an animated GIF, and was able to paste it in an email.
It works! Awesome, thanks!