Contents

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