public static TiffPlanarConfiguration lenientValueOf(final int codeValue) {
        switch (codeValue) {
        case TiffTagConstants.PLANAR_CONFIGURATION_VALUE_CHUNKY:
            return CHUNKY;
        case TiffTagConstants.PLANAR_CONFIGURATION_VALUE_PLANAR:
            return PLANAR;
        default:
            return CHUNKY;
        }
    }
Interprets an integer code value to determine the enumerated value. Implements lenient rules for handling non-compliant values.

@param codeValue an integer code corresponding to the TIFF specification.
@return a valid enumeration.
src/main/java/org/apache/commons/imaging/formats/tiff/constants/TiffPlanarConfiguration.java