-
Notifications
You must be signed in to change notification settings - Fork 21
Possible issue with new readinto functionality #47
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
Comments
I think we do have possibly two issues actually.
using imageload edited not to use The image in use is here: https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad/blob/master/examples/images/4bit.bmp |
Interestingly some images are okay: perhaps there is something specific about the @kmatch98 when you have a chance to take a look, I'm curious to see if you have ideas about what could be causing the differences in final image shown for this one. |
@FoamyGuy I confirmed your issue. I was able to adjust the inputs to I verified that the loaded palette colors exactly the same with both versions. Perhaps the pixel index reads are off by a few bits somewhere? I'm not sure I'll have any time tomorrow to work on this, and anyway we may need to bring jepler into consult. I added the if _bitmap_readinto:
_bitmap_readinto(
bitmap,
file,
bits_per_pixel=color_depth,
element_size=4,
reverse_pixels_in_element=True,
swap_bytes_in_element=False,
reverse_rows=True,
) |
Just a little bit more information to confirm that some of the bitmap color indexes are off by 8 when using the new Here are the bitmap color indexes when using the previous "standard speed" version:
Here are the bitmap color index values with the new "fast"
|
Ok, I found the issue, was an incorrect bitmask for BMPs with 4-bit indexes, along with the This will require:
|
I think the two things above were merged so all should be good to close out this issue. |
I'm getting this error raised from the simpletest script in this repo:
My device is:
The text was updated successfully, but these errors were encountered: