ios - NSData made from gif file reduced to less than 10kb when sending via email -


Ive got a code that creates a GIF file in an NIDITA object in the AP document folder and then returns that object to Connects to the email.

Everything works perfectly in the Xcode Simulator and adds the correct file size in the mail window.

Although the gif displays on the iPad as an animated file in the mail window but the file size is less than 10kb and does not animate when opened at the end.

I have tested the GIF file in the Documents folder via iTunes file sharing and it is working perfectly I check the size of the data in the code below and output for 5.9 mb file 6084937 (checked via iTunes file sharing). It's like 4.1 KB in the mail window.

Any thoughts that I am doing wrong?

Thank you :)

Code given below:

  MFMailComposeViewController * picker = [[MFMailComposeViewController alloc] init]; Picker.mailComposeDelegate = self; [Picker set topic: @ "GIF file from app"]; [Invoice Setmeseed Bidi: @ "MyGamplan GIF Image" is HTML: Yes]; NSURL * documentsDirectoryURL = [[NSFileManager defaultManager] URLFor directory: NSDocumentDirectory inDomain: NSUserDomain useful mask: create zero: yes error: zero]; NSURL * fileURL = [Document DirectoryURL URLByAppendingPathComponent: @ "MyGifPlan.gif"]; NSDTA * gifData = [NSDATA DATAVITY ContentOffFile: [file URL path]]; ///// Check the size of the data NSInteger size = [gifData length]; CCalog (@ "Data size% ld", (long) size); [Picker Ed Attachment Data: GIF Data Mimetype: @ "Image / GIF" filename: @ "MyPlanzF.Gif"]; [[App Navnantron] Present Model Vui Controller: Animated Picker: Yes];  


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -