In the iOS Share Extension, you can capture a preview image using loadPreviewImageWithOptions. Can I resize a preview image?
The preview image is a screenshot of the website. I am wondering if it is possible to get a screenshot with the original size.
As indicated, a dictionary can be created for parameters.
https://developer.apple.com/library/prerelease/ios/documentation/Foundation/Reference/NSItemProvider_Class/index.html#//apple_ref/doc/constant_group/Options_Dictionary_Key
For this reason, I use the following code (trying with different values).
let options: [String: NSValue] = [NSItemProviderPreferredImageSizeKey: NSValue(CGSize: CGSizeMake(375.0, 600.0))] itemProvider.loadPreviewImageWithOptions(options, completionHandler: { [ weak self ] image, error in if let image = image as? UIImage { } })
But the result is always an 84 x 79 image
Thanks!
No one has answered this question yet.
See related questions:
Source: https://habr.com/ru/post/1243431/More articles:Connection Twilio Connection with code: 31002 - androidNested association of ternary operators in php vs java - javaHow to insert and update postgres arrays with yesql in clojure? - postgresqlAn approach for reading an arbitrary number of bits in a fast one - bit-manipulationUse German vocabulary and language model with Sphinx4 - cmusphinxHow to set _id field to search for elasticity using Spring data - spring-dataWhat is the R marking equivalent to LaTeX \ texttt? - rHow to handle dialogs in an architecture based on Angular components - angularjsEmpty string instead of unauthorized group error - pythonSendMessage (WM_COPYDATA) + write + string - delphiAll Articles