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
you need to add this check because if image is already divisible by 8 you add 8 extra pixels and image is distorted.
if(widthPx % 8 != 0) { final targetWidth = (widthPx + 8) - (widthPx % 8); final missingPx = targetWidth - widthPx; final extra = Uint8List(missingPx); for (int i = 0; i < heightPx; i++) { final pos = (i * widthPx + widthPx) + i * missingPx; oneChannelBytes.insertAll(pos, extra); } }
The text was updated successfully, but these errors were encountered:
Fixed
Sorry, something went wrong.
No branches or pull requests
you need to add this check because if image is already divisible by 8 you add 8 extra pixels and image is distorted.
if(widthPx % 8 != 0) {
final targetWidth = (widthPx + 8) - (widthPx % 8);
final missingPx = targetWidth - widthPx;
final extra = Uint8List(missingPx);
for (int i = 0; i < heightPx; i++) {
final pos = (i * widthPx + widthPx) + i * missingPx;
oneChannelBytes.insertAll(pos, extra);
}
}
The text was updated successfully, but these errors were encountered: