public int getHeight() { return this.decoder.getHeight(); }
public void initialize(RandomAccessInputStream in, int y, int h, int imageWidth) { this.decoder.initialize(in, y, h, imageWidth); }
/** * Pre-process the stream to make sure that the * image width and height are non-zero. Returns an array containing * the image width and height. */ public int[] preprocess(RandomAccessInputStream in) { return this.decoder.preprocess(in); }
public JPEGTileDecoder() { decoder = new ome.codecs.JPEGTileDecoder(); }
public byte[] getScanline(int y) { return this.decoder.getScanline(y); }
public void close() { this.decoder.close(); }
public int getWidth() { return this.decoder.getWidth(); }
public JPEGTileDecoder() { decoder = new ome.codecs.JPEGTileDecoder(); }
public byte[] getScanline(int y) { return this.decoder.getScanline(y); }
public void close() { this.decoder.close(); }
public int getWidth() { return this.decoder.getWidth(); }
public void initialize(RandomAccessInputStream in, int y, int h, int imageWidth) { this.decoder.initialize(in, y, h, imageWidth); }
public int getHeight() { return this.decoder.getHeight(); }
/** * Pre-process the stream to make sure that the * image width and height are non-zero. Returns an array containing * the image width and height. */ public int[] preprocess(RandomAccessInputStream in) { return this.decoder.preprocess(in); }
public void initialize(String id, int imageWidth) { this.decoder.initialize(id, imageWidth); }
public void add(byte[] pixels, int x, int y, int w, int h) throws CodecException, IOException { toCompress.add(pixels); row++; if ((y % ROW_COUNT) == ROW_COUNT - 1 || y == getHeight() - 1 || y == yy + hh - 1) { Region r = new Region(x, y - row + 1, w, row); options.width = w; options.height = row; options.channels = 1; options.bitsPerSample = 8; options.signed = false; byte[] compressed = codec.compress(toCompress.toByteArray(), options); compressedTiles.put(r, compressed); toCompress.clear(); } }
public void initialize(RandomAccessInputStream in, int y, int h, int imageWidth) { this.in = in; tiles = new TileCache(y, h); preprocess(this.in); try { Toolkit toolkit = Toolkit.getDefaultToolkit(); byte[] data = new byte[this.in.available()]; this.in.readFully(data); Image image = toolkit.createImage(data); ImageProducer producer = image.getSource(); consumer = new TileConsumer(producer, y, h); producer.startProduction(consumer); while (producer.isConsumer(consumer)); } catch (IOException e) { } }
public void initialize(String id, int imageWidth) { this.decoder.initialize(id, imageWidth); }
public void add(int[] pixels, int x, int y, int w, int h) throws CodecException, IOException { byte[] buf = new byte[pixels.length * 3]; for (int i=0; i<pixels.length; i++) { buf[i * 3] = (byte) ((pixels[i] & 0xff0000) >> 16); buf[i * 3 + 1] = (byte) ((pixels[i] & 0xff00) >> 8); buf[i * 3 + 2] = (byte) (pixels[i] & 0xff); } toCompress.add(buf); row++; if ((y % ROW_COUNT) == ROW_COUNT - 1 || y == getHeight() - 1 || y == yy + hh - 1) { Region r = new Region(x, y - row + 1, w, row); options.width = w; options.height = row; options.channels = 3; options.bitsPerSample = 8; options.signed = false; byte[] compressed = codec.compress(toCompress.toByteArray(), options); compressedTiles.put(r, compressed); toCompress.clear(); row = 0; } }
public void initialize(RandomAccessInputStream in, int imageWidth) { this.decoder.initialize(in, imageWidth); }