QLThumbnailRequestSetImage(_:_:_:)
Sets the thumbnail request to a specified image.
Declaration
func QLThumbnailRequestSetImage(_ thumbnail: QLThumbnailRequest!, _ image: CGImage!, _ properties: CFDictionary!)Parameters
- thumbnail:
The thumbnail request object.
- image:
The image object to be used as the thumbnail of the document.
- properties:
A dictionary of properties for the thumbnail. macOS doesn’t use any properties.
Discussion
You call this function to have Quick Look use the CGImage object supplied in image as the thumbnail. Call QLThumbnailRequestGetMaximumSize(_:) to get the maximum allowed size for thumbnail and resize it if necessary before calling QLThumbnailSetImage.
Special Considerations
Thread-safety: This function should be called in the same thread as the thumbnail request is made in; generally, this is the same thread in which the GenerateThumbnailForURL callback was invoked.
See Also
Handling thumbnail requests
QLThumbnailRequestCopyContentUTI(_:)QLThumbnailRequestCopyOptions(_:)QLThumbnailRequestCopyURL(_:)QLThumbnailRequestCreateContext(_:_:_:_:)QLThumbnailRequestFlushContext(_:_:)QLThumbnailRequestGetDocumentObject(_:)QLThumbnailRequestGetGeneratorBundle(_:)QLThumbnailRequestGetMaximumSize(_:)QLThumbnailRequestGetTypeID()QLThumbnailRequestIsCancelled(_:)QLThumbnailRequestSetDocumentObject(_:_:_:)QLThumbnailRequestSetImageAtURL(_:_:_:)QLThumbnailRequestSetImageWithData(_:_:_:)QLThumbnailRequestSetThumbnailWithDataRepresentation(_:_:_:_:_:)QLThumbnailRequestSetThumbnailWithURLRepresentation(_:_:_:_:_:)