You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creates an image where the total number of pixels does not match dimensions and color type.
E.g: 200x200*3 = 120000, but I'm getting crazy things like 127321
The text was updated successfully, but these errors were encountered:
If the image is a square, it should be an even number.
Huh.
441 = 21 x 21.
The .to_colors() method returns a vector of Color. The QR code here can be divided into 21x21 = 441 little squares each being either light (white) or dark (black). It has nothing to do with the size of image produced by .render().
Creates an image where the total number of pixels does not match dimensions and color type.
E.g: 200x200*3 = 120000, but I'm getting crazy things like 127321
How did you even get that 127321. A Luma<u8> is a grayscale pixel so will only occupy 1 byte per pixel i.e. you don't need to multiply be 3. And 127321 is not a square number (127449 is, but no QR code can be this large).
How it gets to 441 ? If the image is a square, it should be an even number.
I believe this is also affects the images as well:
Creates an image where the total number of pixels does not match dimensions and color type.
E.g: 200x200*3 = 120000, but I'm getting crazy things like 127321
The text was updated successfully, but these errors were encountered: