@ SuppressWarnings ( "WeakerAccess" ) public int segmentHeight ( final int segment , final boolean front ) { final ByteBuffer bytes = getData ( ) ; if ( isColor ) { final int base = segment * 6 ; final int frontHeight = Util . unsign ( bytes . get ( base + 5 ) ) ; if ( front ) { return frontHeight ; } else { return Math . max ( frontHeight , Math . max ( Util . unsign ( bytes . get ( base + 3 ) ) , Util . unsign ( bytes . get ( base + 4 ) ) ) ) ; } } else { return getData ( ) . get ( segment * 2 ) & 0x1f ; } }
Determine the height of the preview given an index into it .