Adds an
IIOReadUpdateListener
to the list of registered update listeners. If
listener
is
null
, no exception will be thrown and no action will be taken. The listener will receive notification of pixel updates as images and thumbnails are decoded, including the starts and ends of progressive passes.
If no update listeners are present, the reader may choose to perform fewer updates to the pixels of the destination images and/or thumbnails, which may result in more efficient decoding.
For example, in progressive JPEG decoding each pass contains updates to a set of coefficients, which would have to be transformed into pixel values and converted to an RGB color space for each pass if listeners are present. If no listeners are present, the coefficients may simply be accumulated and the final results transformed and color converted one time only.
The final results of decoding will be the same whether or not intermediate updates are performed. Thus if only the final image is desired it may be perferable not to register any IIOReadUpdateListener
s. In general, progressive updating is most effective when fetching images over a network connection that is very slow compared to local CPU processing; over a fast connection, progressive updates may actually slow down the presentation of the image.
@param listener an IIOReadUpdateListener to be registered.
@see #removeIIOReadUpdateListener