HarmonyOS AppGallery Promotional Image Generator
Generates a complete set of promotional images (app detail page carousel screenshots / hero images) ready for upload to AppGallery Connect for the current HarmonyOS project.
General Principles
- Do not draw background illustrations with code. Think like a human designer: write prompts → use free image generation models → review images → retry with different seeds or modified prompts if unsatisfied (see Step 3). Code is only used for compositing (collage, rounded corners, text layout, scaling export).
- Always verify specifications online first. The baseline specs embedded in this file may be outdated; perform Step 1 before starting.
- Default output is a "standard promotional image set": 5 portrait phone images (up to 8) + 2-3 landscape tablet images + 2 16:9 PC images. Follow user instructions if otherwise specified.
- Write all output to
<project root>/promotion/; do not pollute the project source code directory. - Place temporary files (downloaded assets, generated images) within the project directory, not in the system's Temp directory.
Workflow
Step 0: Analyze the App
Read the following files to extract information (do not ask the user; read the code yourself):
AppScope/app.json5: bundleName, icon, labelentry/src/main/module.json5: abilities, permissions, device types (tablet/pc support)AppScope/resources/base/element/string.jsonandresources/zh/: app nameentry/src/main/resources/base/profile/main_pages.json+ pages underpages/: feature list- resources under
resources/base/media/: determine brand primary color (e.g., by visually inspecting the icon)
Generate promotion/plan.md containing: app name, one-sentence positioning, 3-5 core selling points (one per promotional image), target audience, brand primary color (hex), and style selection.
Step 1: Verify Specifications Online (Mandatory)
Use websearch / webfetch to check the latest requirements. Example search queries:
AppGallery promotional image size specifications app infoHuawei AppGallery app introduction image screenshot requirementsdeveloper.huawei.com theme design guidelines specifications(HarmonyOS design guidelines)AppGallery Connect image specifications release
Rely on official Huawei documentation (developer.huawei.com / AppGallery Connect Help Center). If official pages are JS-rendered and unreadable, cross-verify with secondary authoritative sources using the above keywords.
Baseline Specifications (Verified Nov 2026, but still requires online re-verification):
| Asset | Size/Aspect Ratio | Format & Limits |
|---|---|---|
| Phone promotional images (portrait) | 1080×1920 / 1080×2340 / 1080×2400 (9:16 ~ 9:19.5) | JPG/PNG, ≤2MB each, 3-8 images |
| Tablet promotional images (landscape) | 2560×1440 (16:9) or 3:2 | Same as above |
| PC promotional images | 1920×1080 (16:9) | Same as above |
| App Store icon | 216×216 (AGC backend) / 512×512 | PNG, rounded corners handled by backend |
| HarmonyOS desktop icon foreground/background | 1024×1024 | PNG, transparent, no built-in rounded corners/margins/shadows |
Review Red Lines: Images must not contain iOS / iPhone / Apple Store / competitor app store logos or device appearances; no false claims inconsistent with actual features; no national flags or politically sensitive elements; no personal information exposed in screenshots.
Record the verification results in promotion/plan.md.
Step 2: Emulator Screenshots (Product Introduction Image Assets)
devecocli devices– check devices; if none, launch an emulator.- If the project is not built:
devecocli build; thendevecocli run --skip-buildto install and launch. - Take screenshots page by page (default: use hdc screenshot; do not use verify_ui – UI verification tool only used when explicitly requested by the user):
hdc shell "snapshot_display -f /data/local/tmp/shot_1.jpeg"
hdc file recv /data/local/tmp/shot_1.jpeg .\promotion\shots\shot_1.jpeg
- Plan screenshots according to selling points: at least one screenshot per core feature page; navigate to the corresponding page before taking the next screenshot.
- If a screenshot is not 1080 pixels wide, record its actual resolution in plan.md, and scale proportionally during compositing.
Step 3: AI Image Generation – Mimic Human Painting (Multi-Style Backgrounds)
Method A (Default, Free, No API Key Required): Pollinations Direct
URL format (prompt must be URL-encoded and in English):
https://image.pollinations.ai/prompt/{encoded_prompt}?width=1024&height=2048&seed={n}
Actual testing notes (Nov 2026):
- Do not include
nologo=true; this parameter has become paid (returns 402 Payment Required). Also do not includemodel=flux; use the default model. - The free tier has rate limiting; the first request often returns 503 (Retry after 10s). Wait 12 seconds and retry; up to 5 retries usually succeed.
$prompt = [uri]::EscapeDataString("soft gradient fluid abstract background, deep blue and cyan, smooth flowing shapes, no text, no watermark")
foreach ($i in 1..5) {
Start-Sleep -Seconds 12
try {
Invoke-WebRequest -Uri "https://image.pollinations.ai/prompt/$prompt`?width=1024&height=2048&seed=42" -OutFile .\promotion\bg\style1_s42.png -TimeoutSec 120
break
} catch { }
}
Human-like iteration: generate 2-3 seeds per style, review each image (judge quality visually), and modify the prompt or change the seed if unsatisfied. Do not generate dozens at once.
Method B (Fallback; used when user requests "operate the webpage like a human"): Browser Automation
If deveco.json is configured with a browser MCP (e.g., @playwright/mcp), open a free image generation site (pollinations.ai, etc.), simulate human input: type prompt → wait for image → download to promotion/bg/. If no such MCP is configured, simply use Method A.
Method C (Preferred over A if available): Pre-configured Image Generation MCP/Connector (e.g., Canva connector's built-in AI image generator).
Style Library (select 3-5 styles in plan.md according to app type; each style corresponds to 1-2 promotional images):
| Style | Suitable For | Prompt Keywords |
|---|---|---|
| Gradient Fluid | Tools/Technology/AI | soft gradient fluid abstract, smooth flowing shapes |
| Minimalist Geometric | Productivity/Business | minimalist flat design, geometric shapes, clean, pastel |
| 3D Cartoon Render | Kids/Education/Casual | cute 3d cartoon render, soft lighting, playful |
| Natural Landscape Photography | Lifestyle/Health/Travel | natural landscape photography, golden hour, bokeh |
| Guochao Illustration | Content/Culture | chinese traditional illustration, modern guochao style |
| Dark Neon | Games/E-sports | dark neon glow, cyberpunk, dramatic lighting |
| Soft Diffuse Light | Social/Emotional | soft diffuse light, dreamy pastel, warm |
Prompt Inviolable Rule: Must include no text, no watermark – text in the images will be handled by compositing in Step 4; AI-generated text is always garbled. Color scheme should revolve around the brand primary color.
Step 4: Composite Product Introduction Images (HarmonyOS Phone Outline + Copywriting)
Use Python + Pillow to compose (if not installed, pip install pillow). Structure for each portrait image:
┌─────────────────┐ 1080×2400
│ App Name (Title) │ ← Title area: app name + one-sentence selling point, brand primary/white text
│ One-sentence │
│ USP │
│ ╭─────────────╮ │
│ │ HarmonyOS │ │ ← Phone body: brand primary gradient rounded rectangle (r≈140px),
│ │ Phone │ │ highlight stroke, embedded Step 2 screenshot (also rounded clipped)
│ │ ┌─────────┐ │ │
│ │ │ Screenshot│ │ │
│ │ └─────────┘ │ │
│ ╰─────────────╯ │
│ icon + App Name │ ← Bottom brand area
└─────────────────┘
Minimum viable skeleton (modify parameters as needed; do not copy rigidly):
from PIL import Image, ImageDraw, ImageFilter, ImageFont
W, H = 1080, 2400
bg = Image.open("bg/style1_s42.png").convert("RGB")
bg = bg.resize((W, H)) # fill background; crop first if necessary to maintain aspect ratio
img = bg.copy()
draw = ImageDraw.Draw(img)
# HarmonyOS phone frame
frame_w, frame_h = 760, 1560
fx, fy = (W - frame_w) // 2, 560
body = Image.new("RGB", (frame_w, frame_h), (20, 20, 25))
mask = Image.new("L", (frame_w, frame_h), 0)
ImageDraw.Draw(mask).rounded_rectangle([0, 0, frame_w, frame_h], radius=110, fill=255)
img.paste(body, (fx, fy), mask)
shot = Image.open("shots/shot_1.jpeg").convert("RGB")
shot = shot.resize((frame_w - 24, int((frame_w - 24) * shot.height / shot.width)))
if shot.height > frame_h - 24:
shot = shot.crop((0, 0, shot.width, frame_h - 24))
smask = Image.new("L", shot.size, 0)
ImageDraw.Draw(smask).rounded_rectangle([0, 0, shot.width, shot.height], radius=98, fill=255)
img.paste(shot, (fx + 12, fy + 12), smask)
draw.rounded_rectangle([fx, fy, fx + frame_w, fy + frame_h], radius=110, outline=(255, 255, 255), width=4)
# Text (Chinese font: Windows use msyh.ttc; HarmonyOS Sans preferred if installed)
font_big = ImageFont.truetype("C:/Windows/Fonts/msyh.ttc", 88)
font_sub = ImageFont.truetype("C:/Windows/Fonts/msyh.ttc", 46)
draw.text((W // 2, 300), "App Name", font=font_big, fill=(255, 255, 255), anchor="mm")
draw.text((W // 2, 410), "One-sentence USP", font=font_sub, fill=(230, 230, 230), anchor="mm")
img.save("final/phone/poster_1.png", optimize=True)
Requirements:
- For tablet/PC versions: use landscape layout – screenshot on left or right, text area opposite side; resolution as verified in Step 1.
- After export, check each image: single file ≤2MB (if exceeded, convert to JPG quality=88 or downsample); text must not obscure main content; rounded corners should be natural.
- Copywriting should be distilled from selling points in plan.md, using short phrases (≤12 characters per line). No false feature descriptions.
Step 5: Optional Enhancement – Web Design Tools (Canva Connector, etc.)
Canva provides a wealth of built-in graphical assets: ready-to-use templates (app promotion / phone poster categories), shapes, illustration stickers, icons, and typography. An AI using the Canva connector can directly apply these built-in graphics for polishing, without drawing from scratch.
- Check the project's
deveco.json/ global configuration formcpsections containing design connectors like canva, Figma, MasterGo, Pixso. - If Canva is available: Search for built-in templates (keywords: "app promotion" / phone poster) → replace Step 3 AI backgrounds and Step 2 screenshots into template placeholders → fine-tune layout and copywriting using built-in graphics → export to
promotion/final/. This leverages Canva's ready-made design assets, making it fast and professional. - If not available: Skip this step. The main workflow (free image generation + compositing) is sufficient. Notify the user that configuring a Canva connector would provide template polishing capabilities.
Purpose: This step is an optional polish enhancement. The primary promotional image output always comes from Step 3 (free Pollinations generation) + Step 4 (code compositing). Canva is only used when the connector exists and the user desires more refined, template-based layout.
Step 6: Self-Check & Delivery
For each image in promotion/final/, verify:
- Resolution matches the specifications verified in Step 1 (size, aspect ratio)
- Format is JPG/PNG, single file ≤2MB
- Phone images: 3-8 images, each corresponding to one selling point
- No iOS/Apple/competitor logos, no watermarks, no garbled text
- Chinese copywriting has no typos and is consistent with the app's actual features
Directory structure:
promotion/
plan.md # Selling points, spec verification records, style selection
shots/ # Emulator original screenshots
bg/ # AI-generated backgrounds (multiple styles, multiple seeds)
final/phone/ # Phone final images
final/tablet/ # Tablet final images (if applicable)
final/pc/ # PC final images (if applicable)
manifest.md # Delivery checklist: file names, sizes, file sizes, corresponding selling points
Report to the user upon delivery: path to final images, size and corresponding selling point for each image, and where to upload them in AppGallery Connect (App Info → Introduction Image / Promotional Image).