* Fix distortion calculation for isosceles right triangles
* Revert "Fix distortion calculation for isosceles right triangles"
This reverts commit 4a8ad9a5be.
* Add comment to distortion calculation
The formula for calculating the distortion seems wrong but practically it seems to work slightly better
* throw a more explicit exception when trying to PDF417/TEXT encode something outside of 0...255
* refactor PDF417HighLevelEncoder to avoid code duplication
extend UT to new method PDF417HighLevelEncoder#checkCharset
* fix javadoc typo
make UT more stringent on PDF417HighLevelEncoder#checkCharset
* restrict TEXT to 0...127
test with CP437 and Greek chars
* reinstate testEncodeAuto UT
* refactor testEncodeAuto UT
* address codacy findings
* formatting
* fix issue #1831
make PDF417#determineDimensions to enable finer UT
add UT coverage to validate fix for #1831
* fix javadoc for PDF417#determineDimensions
remove stacktrace when UT fails
* make UT Java 8 compliant
* throw a more explicit exception when trying to PDF417/TEXT encode something outside of 0...255
* refactor PDF417HighLevelEncoder to avoid code duplication
extend UT to new method PDF417HighLevelEncoder#checkCharset
* fix javadoc typo
make UT more stringent on PDF417HighLevelEncoder#checkCharset
* restrict TEXT to 0...127
test with CP437 and Greek chars
* reinstate testEncodeAuto UT
* refactor testEncodeAuto UT
* address codacy findings
* formatting
* be more stringent on email validation rules
add UT to validate various email formats
* fix indentation
* fix failing UT case
* refine regex for email's domain:
* only letters in the last part
* no part starting or ending with a - (- allowed inside the part)
add UT to cover such cases
This small commit makes public the "renderResult" method of the
"QRCodeWriter" class.
The reason to promote this method as public is that I'm facing
Business Case where, besides of generating the QR code as a PNG image,
I also need to print information about the QR code itself (specifically,
the QR version). Navigating through the code of zxing library, I noticed
that the com.google.zxing.qrcode.encoder.Encoder allows me to have that
(the QR metadata); however, by invoking that class I only have part of
the equation (the QRCode DTO) ... I'm still needing to generate the
BitMatrix in order to produce the QR image.
Here, I have two alternatives: either I invoke the Encoder.encode
class by myself and repeat the same logic when invoking the
QRCodeWriter.encode method; or I make the renderResult Public, call the
Encoder.encode and then I proceed to call the QRCodeWriter.renderResult
method with the previous result.
* Add support for embedded JREs where SJIS isn't available
(cherry picked from commit 67896f97042f5a9772f0ebcfdbb91f275d86e087)
* Add support for embedded JREs where EUC_JP isn't available
(cherry picked from commit 979d3b648982b151b7a1e779e58d445086911b31)
This method is useful for encoding Code128 with a specific code set to a bool array. As no other class overrides this method, this change only affects Code128Writer.
I don't know that there's a strong argument against making this method public. With this method protected, it is necessary to first encode as a BitMatrix, extract the first row, and the convert the resulting BitArray to a bool array. This all can be avoided if the method is made public.