mozIRepresentativeColorCallback

Provides callback methods for mozIColorAnalyzer
1.0
28
Introduced
Gecko 17.0
Inherits from: nsISupports Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14)

Method overview

void onComplete(in boolean success, [optional] in unsigned long color);

Methods

Requires Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14)

onComplete()

Will be called when color analysis finishes.

void onComplete(
  in boolean success,
  [optional] in unsigned long color
);
Parameters
success
True if analysis was successful, false otherwise. Analysis can fail if the image is transparent, imageURI doesn't resolve to a valid image, or the image is too big.
color
The representative color as an integer in RGB form. e.g. 0xFF0102 == rgb(255,1,2). If success is false, color is not provided.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, ethertank, mnoorenberghe
 Last updated by: Sheppy,