GIF images do not get rendered properly #359
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#359
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Animated GIFs only render one image and all GIFs, both animated and still only render as a black square instead of a full image.
Tried on the test server, in Chromium (desktop, Android profile) and WebKit (iPhone profile), with a spec (
e2e/tests/gif.spec.tson branchissue-359-gif):What I can fix now: keep a GIF as it is whenever it fits the limit, and when it doesn't, say in the composer that the animation is lost ("För stor för servern: skickas som stillbild"). A browser can't re-encode an animated GIF smaller.
The black square I could not reproduce. In dark mode, an image the browser fails to decode shows as NeoKOM's dark checkered background, which may look like a black square, so I think the picture data itself is broken somewhere. To find where:
Done in PR #391 (D-072), main run #749 green. When a picture is redrawn to fit, the composer, the chat's reply field and the profile editor now list what changed under it: the original's size against the server's limit, pixels before and after, format and JPEG quality, transparent parts turned white, and a lost animation (GIF frames counted; animated PNG and WebP recognised). A picture that goes as it is says nothing. The black square isn't chased further.
Verified: unit tests for the frame counting; e2e gif.spec (a half-transparent 2000 px PNG and a too-big animated GIF show their lists; a small GIF shows none) plus compose, profile and thread-chat specs, 51/51 in desktop, Android and iPhone profiles.