我的應用程序需要整個網頁的屏幕截圖。當它保存到相冊時,圖像質量會有所變化,靜止圖像上的文字模糊且難以閱讀。我發現這個解決方案有望在保存到相冊時具有更好的質量,但它似乎仍然不是完全可以接受的。有沒有比這更好的方式將UIImage保存爲相冊,而且質量損失極小?謝謝。保存UIImage沒有質量損失
UIImage* img = [UIImage imageWithCGImage:screenshotImage.CGImage];
NSData* imdata = UIImagePNGRepresentation (img);
UIImage* image = [UIImage imageWithData:imdata]; // wrap UIImage around PNG representation
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
你有沒有檢查'img'和'圖像質量(可能顯示在圖像視圖)? –
http://developer.apple.com/library/ios/#qa/qa1703/_index.html –
你失去了什麼質量?請給出一些截圖,你的意思是什麼_lose quality_。 – holex