private int getTileSize() { int channels = getRGBChannelCount(); int bpp = FormatTools.getBytesPerPixel(getPixelType()); int index = getCoreIndex(); return bpp * channels * tileX.get(index) * tileY.get(index); }
private int getTileSize() { int channels = getRGBChannelCount(); int bpp = FormatTools.getBytesPerPixel(getPixelType()); int index = getCoreIndex(); return bpp * channels * tileX.get(index) * tileY.get(index); }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(currentId, true, 1); int currentIndex = getCoreIndex(); int thumbSize = getThumbSizeX() * getThumbSizeY() * FormatTools.getBytesPerPixel(getPixelType()) * getRGBChannelCount(); if (getCoreIndex() >= fileMap.size() || usedFiles.length >= core.size()) { return super.openThumbBytes(no); } setCoreIndex(fileMap.size()); byte[] thumb = FormatTools.openThumbBytes(this, 0); setCoreIndex(currentIndex); if (thumb.length == thumbSize) { return thumb; } return super.openThumbBytes(no); }
@Override public byte[] openThumbBytes(int no) throws FormatException, IOException { FormatTools.assertId(currentId, true, 1); int currentIndex = getCoreIndex(); int thumbSize = getThumbSizeX() * getThumbSizeY() * FormatTools.getBytesPerPixel(getPixelType()) * getRGBChannelCount(); if (getCoreIndex() >= fileMap.size() || usedFiles.length >= core.size()) { return super.openThumbBytes(no); } setCoreIndex(fileMap.size()); byte[] thumb = FormatTools.openThumbBytes(this, 0); setCoreIndex(currentIndex); if (thumb.length == thumbSize) { return thumb; } return super.openThumbBytes(no); }
getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType()); int outputRowLen = w * pixel;
getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType()); int outputRowLen = w * pixel;