Skip to content
New issue

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

This GIF is not displayed correctly in #223

Open
mmouchous-ledger opened this issue Nov 19, 2024 · 1 comment
Open

This GIF is not displayed correctly in #223

mmouchous-ledger opened this issue Nov 19, 2024 · 1 comment

Comments

@mmouchous-ledger
Copy link

By using the Boilerplate/Rust application and changing the file name in ui_menu_main function from

qrlink

    const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("crab_64x64.gif", NBGL));

to

    const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("qrlink.gif", NBGL));

output is inverted on Speculos and miss-shown on real device (Flex and Stax)

Screenshot 2024-11-19 at 17 35 28

IMG_2607

File has been generated with this code:

import qrcode

# Create a QR code object
qr = qrcode.QRCode(version=1, box_size=2, border=0)


# Define the data to be encoded in the QR code
data = "https://www.ledger.com/"

# Add the data to the QR code object
qr.add_data(data)

# Make the QR code
qr.make(fit=True)

# Create an image from the QR code
img = qr.make_image(fill_color="white", back_color="black")

# Save the QR code image
img.save("qrlink.gif", format="GIF")
@mmouchous-ledger
Copy link
Author

In this case:

  • The inversion of the color is present only on the RUST SDK, so it may be a problem in the "include_gif" macro.
  • The distorition of the image is also present for the C SDK, so it may be a underlying problem. Note that it is appearing for images which are not sized with a multiple of "4" (or maybe 8) in height (or maybe width)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant