¡@

Home 

2014/10/15 ¤U¤È 10:05:24

iphone Programming Glossary: compressionlevel

UIImageJPEGRepresentation - memory release issue

http://stackoverflow.com/questions/2655769/uiimagejpegrepresentation-memory-release-issue

I'm trying to decrease quality until obtain an image under 300Ko. In order to obtain the good value of the quality compressionLevel who give me a jpg under 300Ko I have made the following loop. It's working but each time time the loop is executed the memory.. is executed the memory increase of the size of the original size of my jpg 700Ko despite the tmpImage release . float compressionLevel 1.0f int size 300001 while size 300000 UIImage tmpImage UIImage alloc initWithContentsOfFile self fullDocumentsPathForTheFile.. initWithContentsOfFile self fullDocumentsPathForTheFile @ imageToAnalyse.jpg size UIImageJPEGRepresentation tmpImage compressionLevel length tmpImage release In the following line the 0.001f decrement is choose just in order test the increase of the memory..

How can I convert my Zip-file to NSData to email my Zip file as an attachment

http://stackoverflow.com/questions/7809359/how-can-i-convert-my-zip-file-to-nsdata-to-email-my-zip-file-as-an-attachment

alloc initWithFileName path mode ZipFileModeCreate ZipWriteStream stream readFile writeFileInZipWithName @ foto2.jpg compressionLevel ZipCompressionLevelNone stream writeData fotoData stream finishedWriting MFMailComposeViewController picker MFMailComposeViewController.. alloc initWithFileName path mode ZipFileModeCreate ZipWriteStream stream readFile writeFileInZipWithName @ foto2.jpeg compressionLevel ZipCompressionLevelNone stream writeData imageData2 stream finishedWriting MFMailComposeViewController picker MFMailComposeViewController..