Semantic GIF Redesign
Objective and Scope
Preserve the emotion, purpose, text, and directional indicators of the original sticker, and redesign the shape, material, color, expression, and motion. The target style must be distinctly different from the original and suitable for stickers, for example: polymer clay, jelly, plush, origami, pixel art, watercolor sticker. Do not claim a semantic redesign has been completed by merely recoloring, outlining, or applying filters.
Based on the request, select among single sample, random N items, process all remaining, coverage verification, or archive mode. Verification mode is read-only by default. The quantity, output size, and background requirements follow user preferences; this project commonly uses two sets of transparent looping versions at 512px and 256px.
Source Selection and Historical Coverage
- Confirm the original image directory, scanning scope, and output directory. By default, only scan the root level of the original directory; exclude generated results and summary subdirectories to prevent new versions from being treated as original images again.
- Decode files one by one, report file count, single-frame, multi-frame, corrupted files, dimensions, per-frame duration, and looping information. The file extension cannot prove whether the file is animated. Report single-frame GIFs separately; dynamic animation may be designed upon user request.
- Deduplicate original files by content using SHA-256, preserving an alias mapping for identical content. Different filenames with identical content do not need to be remade.
- Summarize historical
source_metadata.json,selection.json,validation.json, the finished product list, and savedoriginal.gif. When older records lack SHA-256, directly compute the hash of the historicaloriginal.gif; do not treat missing fields as unprocessed. Paths may be absolute or relative. - Coverage evidence must link "current original content → historical source → a truly existing and decodable new version of the finished product". An old directory with the same name, being merely selected, or having only prompts or sprite sheets cannot individually prove completion. Distinguish between old style versions and this round's semantic redesign version.
- For random N items, sample without replacement from unique uncompleted content, save the random result, then lock; continuation runs use the saved record. The "all remaining" mode processes all candidates. Report insufficient candidates honestly; do not pad with static files or already-completed files.
Image Analysis and Design
Split frames, create a contact sheet with frame numbers and durations, examine the start, middle, end, and key actions. Record the subject, cause-and-effect of actions, emotion, usage scenario, text, and direction, and summarize into one core meaning.
For each item, write out: original name and hash, core meaning, new title, target style, vibrant color scheme, action beat, and actual generation prompt. The action should include preparation, change, feedback, and loop; for example, a red envelope starts with wobbling, then opens, sprays blessings, and closes. Preserve original text; do not arbitrarily change advertising copy; arrow directions must remain correct frame by frame.
Sprite Sheet Generation
Preferentially use the built-in image generation capability available in the current environment; invoke each item independently and record the output path; if the tool is unavailable, explain the obstacle, and do not use placeholder images as generation results. Save the final selected sprite sheets to the workspace, preserving the tool's original files.
Common sprite sheets are 1536×1024, 3 columns × 2 rows with six cells: the first three cells are key poses of the same subject, the last three cells are independent small decorations; character performances may use all six cells for poses. Ensure same scale, same perspective, transparent margins within cells, no grid labels, no background or watermark. Only a semantic description is needed to achieve redesign; if a reference image is used, clearly indicate it is only for semantics or the elements to be preserved.
Transparent output must request true alpha. Check RGBA channels and edge pixels; black, gradient, or white in preview does not necessarily mean the background is opaque, and an alpha minimum greater than zero does not necessarily fail; evaluate by combining background area, threshold, and actual compositing. Conversely, a small number of transparent pixels does not prove the entire sprite sheet is usable. If the background is abnormal, regenerate specifically; do not forcibly pass the test by erasing the subject as a rectangle.
Asynchronous batch return order cannot be used to match item numbers: immediately save each result's id, prompt, and generation path mapping, then copy and review each item. After interruption, check existing results before retrying to avoid duplicate paid generations.
Animation Compositing
Slice according to the actual sprite sheet layout, crop out each independent material. Transparent gaps may assist recognition, but the slice results must be checked to prevent cross-cell cropping or cutting off ears or decorations. Use key pose switching combined with displacement, scaling, rotation, and particles to organize motion; avoid simply translating a static image to fake new motion. For pixel art, use nearest-neighbor scaling; for others, typically use high-quality scaling.
Text may use an independent stable layer, remaining readable throughout the motion; avoid having a title or text only on the first frame, disappearing with the pose. The border center should be naturally transparent; do not replace it with a hard rectangular cutout that damages the border shape. Arrow motion should follow its indicated direction.
Encoding GIFs can be done with Pillow or FFmpeg. Common starting point is about 2.4 seconds, 48 frames, but adjust according to motion; do not enforce a uniform value. GIF duration is in units of 10ms; for original images with zero delay, record and explicitly state the normalization method. Shared palette, transparent index, disposal, and loop settings must be verified through decoding. GIF binary transparency loses semi-transparent halos; check edges against light and dark backgrounds.
After modifying sprite sheets, prompts, or animation parameters, invalidate the corresponding cache, regenerate the item's frames, finished product, and verification record, then update the overview, comparison page, and archive. Do not continue reusing old validation.json.
Acceptance and Delivery
For each item, check whether the new version matches the original intent, whether the style has changed significantly, whether text, direction, character actions are correct, and whether the subject is complete. Automatically decode to check dimensions, actual frame count, number of different frames, total duration, infinite loop, visible content, and transparent four edges; for borders, additionally check center transparency. Do not delete or relax failed assertions to create a pass result; instead, fix the content or correct the inapplicable check area and provide an explanation.
Generate previews on white, dark, and checkerboard backgrounds, check representative frames and the complete loop. Examine at least each item's key poses; automatic frame count checking cannot replace visual acceptance testing.
Output finished products, original/new dynamic comparison page, overview, per-item meaning and prompts, source mapping, quality inspection report, and test archive. All HTML references must exist; archives require decompression integrity check. The number of items, groups, index heights, and labels on the summary page are generated from the actual sample count; do not retain hardcoded values from the previous batch.
Create a separate summary directory under the original GIF directory as requested by the user, copy and verify source/target hashes; retain the original image. Use the current client date for the directory, with a batch number to avoid conflicts; do not fabricate future dates to continue a batch. When copying review.html, also copy its dependencies, or provide a clear entry link to the full page; an isolated HTML file is not considered a usable deliverable.
Final report: actual number of completed items, file count, output entry, unfinished items and reasons. Zero remaining items must be based on re-scanning and complete evidence coverage; do not simply reference the old report.
Project Resources and Reuse Boundaries
If the project retains historical output/gif_semantic_batch_*/ directories, you may reference their source selection, animation, and encoding scripts, but first check hardcoded counts, dates, title skip lists, type branches, and cache logic before parameterizing for a new batch. This skill package does not include these project scripts; execute using current project resources or write code as needed for the task. Original image frame splits and sprite sheets are intermediate resources; by default, they do not need to be included in the delivery archive.
This project has previously verified 293 original GIFs, among which 228 were multi-frame, 65 were single-frame, and after dynamic content deduplication, there were 225 unique items. These are merely historical snapshots; new tasks must redo the statistics. Some older records lack sha256, and there are early samples not in the standard batch directory; when verifying, include the original copies and actual finished products.