public void imageComplete(int pStatus) { fetching = false; if (producer != null) { producer.removeConsumer(this); } switch (pStatus) { case ImageConsumer.IMAGEERROR: consumerException = new ImageConversionException("ImageConsumer.IMAGEERROR"); break; } synchronized (BufferedImageFactory.this) { BufferedImageFactory.this.notifyAll(); } }
@Override public void imageComplete(final int status) { producer.removeConsumer(this); }
@Override public void imageComplete(int status) { producer.removeConsumer(this); }
@Override public void imageComplete(final int status) { producer.removeConsumer(this); }
/** {@code ImageConsumer} implementation, do not invoke */ public void imageComplete(int pStatus) { mFetching = false; if (mProducer != null) { mProducer.removeConsumer(this); } switch (pStatus) { case IMAGEERROR: new Error().printStackTrace(); mError = true; break; } synchronized (BufferedImageFactory.this) { BufferedImageFactory.this.notifyAll(); } }
public void imageComplete(int pStatus) { fetching = false; if (producer != null) { producer.removeConsumer(this); } switch (pStatus) { case ImageConsumer.IMAGEERROR: consumerException = new ImageConversionException("ImageConsumer.IMAGEERROR"); break; } synchronized (BufferedImageFactory.this) { BufferedImageFactory.this.notifyAll(); } }
public void imageComplete(int completionStatus) { if (debug) { System.err.println("imageComplete(): "); if ((completionStatus == IMAGEABORTED)) System.err.println("\tIMAGEABORTED"); if ((completionStatus == IMAGEERROR)) System.err.println("\tIMAGEERROR"); if ((completionStatus == SINGLEFRAMEDONE)) System.err.println("\tSINGLEFRAMEDONE"); if ((completionStatus == STATICIMAGEDONE)) System.err.println("\tSTATICIMAGEDONE"); } producer.removeConsumer(this); status = completionStatus; finished = true; unblock(); fireChangeListeners(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
@Override public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete(int status) { producer.removeConsumer(this); if (status == ImageConsumer.IMAGEABORTED) iox = new IOException("image aborted"); else { try { encodeFinish(); encodeDone(); } catch (IOException e) { iox = e; } } stop(); }
public void imageComplete( int status ) { producer.removeConsumer( this ); if ( status == ImageConsumer.IMAGEABORTED ) iox = new IOException( "image aborted" ); else { try { encodeFinish(); encodeDone(); } catch ( IOException e ) { iox = e; } } stop(); }
/** * Create a {@link java.awt.image.BufferedImage} from the given source * image producer. If the source is an animated GIF, it will only return * the first frame. * * @param prod The source imageproducer to create buffered image from * @return A complete buffered image representation of this image */ public static BufferedImage createBufferedImage(ImageProducer prod) { ImageGenerator gen = new ImageGenerator(); prod.startProduction(gen); BufferedImage img = gen.getImage(); // Remove the consumer to stop the animated GIF code going in to // an endless production loop. prod.removeConsumer(gen); return img; } }
/** * Create a {@link java.awt.image.BufferedImage} from the given source * image. If the source image is already a buffered image it will * immediately return with the parameter as the return value. * * @param img The source image to create buffered image from * @return A complete buffered image representation of this image */ public static BufferedImage createBufferedImage(Image img) { if(img instanceof BufferedImage) return (BufferedImage)img; ImageProducer prod = img.getSource(); ImageGenerator gen = new ImageGenerator(); prod.startProduction(gen); BufferedImage ret_val = gen.getImage(); // Remove the consumer to stop the animated GIF code going in to // an endless production loop. prod.removeConsumer(gen); return ret_val; }