-
Notifications
You must be signed in to change notification settings - Fork 32
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
Resizing Luma+alpha image on ARM (Apple) causes stripe artifacts #49
Labels
bug
Something isn't working
Comments
MichaelGrupp
added a commit
to MichaelGrupp/maps
that referenced
this issue
Mar 17, 2025
The issue doesn't affect RGBA8 and others. Since all images are now anyway converted to RGBA8 in this app, we don't run into this problem anymore currently. See: Cykooz/fast_image_resize#49
MichaelGrupp
added a commit
to MichaelGrupp/maps
that referenced
this issue
Mar 17, 2025
The issue doesn't affect RGBA8 and others. Since all images are now anyway converted to RGBA8 in this app, we don't run into this problem anymore currently. See: Cykooz/fast_image_resize#49
MichaelGrupp
added a commit
to MichaelGrupp/maps
that referenced
this issue
Mar 18, 2025
The issue doesn't affect RGBA8 and others. Since all images are now anyway converted to RGBA8 in this app, we don't run into this problem anymore currently. See: Cykooz/fast_image_resize#49
MichaelGrupp
added a commit
to MichaelGrupp/maps
that referenced
this issue
Mar 18, 2025
The issue doesn't affect RGBA8 and others. Since all images are now anyway converted to RGBA8 in this app, we don't run into this problem anymore currently. See: Cykooz/fast_image_resize#49
unsafe fn multiply_alpha_row(src_row: &[U8x2], dst_row: &mut [U8x2]) {
let src_chunks = src_row.chunks_exact(32);
let src_remainder = src_chunks.remainder();
let mut dst_chunks = dst_row.chunks_exact_mut(32); to unsafe fn multiply_alpha_row(src_row: &[U8x2], dst_row: &mut [U8x2]) {
let src_chunks = src_row.chunks_exact(16);
let src_remainder = src_chunks.remainder();
let mut dst_chunks = dst_row.chunks_exact_mut(16); if that makes sense. P.S. NEON is mandatory extension on Aarch64, #[target_feature(enable = "neon")] is enforced on all code which target is Aarch64. |
Thank you for report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
thanks for this nice library. I noticed an issue with LA8 grayscale images that have an alpha channel on ARM, specifically Apple Silicon (I used M1 & M4). With the NEON extensions that are enabled by default, the resized LA8 image has stripes. Disabling NEON removes those stripes. The issue also doesn't seem to affect RGB, RGBA8 or L8; these can be resized with NEON in my tests. Haven't tested LA16.
Here is an example using dummy images created with Gimp: one LA8 image and an RGBA8 image.
This can be reproduced using the resizer example from the main branch (a472768):
I didn't dig deeper than that, for my personal project it was sufficient to convert to RGBA8 to "fix" the issue. I also don't know if this only an issue on Apple Silicon or also on other ARM platforms.
The text was updated successfully, but these errors were encountered: