We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently there is not support to be able to set the QR correction level, Would it be possible to add this please find proposed solution
public enum ErrorCorrection { LOW, MEDIUM, QUARTILE, HIGH }
private ErrorCorrectionLevel getCorrectionLevel(ErrorCorrection errorCorrectionLevel) { switch (errorCorrectionLevel) { case LOW: return ErrorCorrectionLevel.L; case MEDIUM: return ErrorCorrectionLevel.M; case QUARTILE: return ErrorCorrectionLevel.Q; case HIGH: return ErrorCorrectionLevel.H; default: throw new IllegalArgumentException("Unknown error correction level: " + errorCorrectionLevel); } }
public Bitmap getBitmap(int margin) { return getBitmap(margin, null); } public Bitmap getBitmap(int margin, ErrorCorrection errorCorrectionLevel) { .... if (encoding != null) { hints.put(EncodeHintType.CHARACTER_SET, encoding); } if (errorCorrectionLevel != null) { hints.put(EncodeHintType.ERROR_CORRECTION, getCorrectionLevel(errorCorrectionLevel)); } hints.put(EncodeHintType.MARGIN, margin); .... }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently there is not support to be able to set the QR correction level, Would it be possible to add this please find proposed solution
The text was updated successfully, but these errors were encountered: