private void decode(SubPictureDVD pic) throws CoreException {
palette = SupDvdUtil.decodePalette(pic, srcPalette);
bitmap = SupDvdUtil.decodeImage(pic, fileBuffer, palette.getIndexOfMostTransparentPaletteEntry());
// crop
BitmapBounds bounds = bitmap.getCroppingBounds(palette.getAlpha(), configuration.getAlphaCrop());
if (bounds.yMin > 0 || bounds.xMin > 0 || bounds.xMax < bitmap.getWidth() - 1 || bounds.yMax < bitmap.getHeight() - 1) {
int width = bounds.xMax - bounds.xMin + 1;
int height = bounds.yMax - bounds.yMin + 1;
if (width < 2) {
width = 2;