Struct xpcom::interfaces::mozIColorAnalyzer [] [src]

#[repr(C)]
pub struct mozIColorAnalyzer { /* fields omitted */ }

interface mozIColorAnalyzer : nsISupports

Methods

impl mozIColorAnalyzer
[src]

[src]

Cast this mozIColorAnalyzer to one of its base interfaces.

impl mozIColorAnalyzer
[src]

[src]

/**
   * Given an image URI, find the most representative color for that image
   * based on the frequency of each color.  Preference is given to colors that
   * are more interesting.  Avoids the background color if it can be
   * discerned.  Ignores sufficiently transparent colors.
   *
   * This is intended to be used on favicon images.  Larger images take longer
   * to process, especially those with a larger number of unique colors.  If
   * imageURI points to an image that has more than 128^2 pixels, this method
   * will fail before analyzing it for performance reasons.
   *
   * @param imageURI
   *        A URI pointing to the image - ideally a data: URI, but any scheme
   *        that will load when setting the src attribute of a DOM img element
   *        should work.
   * @param callback
   *        Function to call when the representative color is found or an
   *        error occurs.
   */

void findRepresentativeColor (in nsIURI imageURI, in mozIRepresentativeColorCallback callback);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for mozIColorAnalyzer
[src]

IID: nsIID = nsID(3495303276, 10400, 18766, [170, 204, 158, 67, 55, 114, 177, 67])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for mozIColorAnalyzer
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for mozIColorAnalyzer
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.