3.4 KiB
3.4 KiB
S005 — /speechbubble checks
Run in Discord (owner) unless noted. Bot must have the S005 build.
Doubts
- GIF transparency: the
imagecrate's GIF encoder decides which colour index is transparent and the frame disposal. If cut-out areas show old frames or a black/odd colour in an animated result, fix the encoder (key colour, disposal Background). - Bubble edges are not anti-aliased (hard pixels); check this looks acceptable next to the references.
- Shape numbers (
BUBBLE_HEIGHT0.2,BUBBLE_WIDTH0.62, tail at 0.12 to 0.28 of the width) are a guess from the reference GIFs; compare and tune. - Video path never run (ffmpeg and libx264 on the server). Odd video widths under 480 px may break MP4 encoding (same as /caption).
- Prefix option words (
bottom,flip,solid) are plain words in the text; a link containing them is fine, other text is ignored.
Checks
- Contact sheet: extract 2 frames of
assets/reference/speechbubble-bsm.gifandspeechbubble-assyst.gif; put the bot'ssolidand plain results of the same picture next to them. Shape and tail direction match. /speechbubblewith a PNG attached: PNG back, transparent wide ellipse cut from the top, tail pointing down toward the right third.- Same with
solid:true: white fill, black outline, tail points into the picture, picture edge follows the curve. position:bottom: bubble hangs from the bottom edge, tail points up.flip:true: tail on the left third instead (also with bottom and with solid).- JPG and still WebP input: PNG out, transparent (not JPG).
- GIF input: GIF out, still animated, bubble on every frame, transparent area stays clear (no ghost of earlier frames).
- Animated WebP input: GIF out.
- MP4, WebM, MOV without
solid: GIF out with transparent bubble, at most about 10 s. - Video with
solid:true: MP4 out that plays, no sound, bubble on every frame. source-link:<public image link>: works.D!speechbubble <link>: works.D!speechbubble bottom flip solidreplying to a picture: all three options applied.- No source: uses the latest picture in the channel; nothing in the channel: clear error card.
- Big result (large PNG or GIF over the upload limit): retried smaller; if still too big, clear "too big" error. A solid still may come out as JPG; a transparent one never does.
- Bad link (
http://127.0.0.1/x) and non-media file (PDF): error card, no crash. /helplistsspeechbubble(aliasbubble);cargo test helplimits test passes.- Unit tests
bubble_tail_flips_and_touches_chosen_edgeandbubble_cuts_transparent_or_paints_solidpass (cargo test bubble). /captionstill works on a picture and a video (its video code was refactored intomap_frames).
Results (S010, 2026-12-01)
- 1 pass by eye: contact sheet (reference GIF frames next to plain, solid, bottom, flip, GIF). Shape and tail direction match; edges are hard pixels but acceptable at Discord size. No tuning done.
- 2, 3, 4, 5 pass (rendered by test on a PNG: transparent cut-out, solid white with outline, bottom hangs with tail up, flip moves the tail). 7 pass (GIF: transparent top stays clear, no ghost of earlier frames in frame 2). 16, 17 pass; 18 pass for the still and GIF path (
caption_keeps_picture_kind). - 6, 8, 9, 10, 11, 12, 13, 14, 15: not run: Discord or video path (owner, S011).
- Doubt GIF transparency: looked fine in ImageMagick; Discord rendering not checked.