{"id":50960524,"url":"https://github.com/vimcomes/ideogram4-editor","last_synced_at":"2026-06-18T13:02:51.273Z","repository":{"id":363635123,"uuid":"1261970839","full_name":"vimcomes/ideogram4-editor","owner":"vimcomes","description":"GUI layer editor for Ideogram 4 structured JSON prompts — draw bbox regions on canvas, set properties, export ready-to-use JSON","archived":false,"fork":false,"pushed_at":"2026-06-09T18:08:14.000Z","size":7136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-09T19:18:04.986Z","etag":null,"topics":["ai-art","dearpygui","ideogram","ideogram4","image-generation","prompt-editor","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimcomes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-07T12:00:41.000Z","updated_at":"2026-06-09T18:08:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vimcomes/ideogram4-editor","commit_stats":null,"previous_names":["vimcomes/ideogram4-editor"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vimcomes/ideogram4-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimcomes%2Fideogram4-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimcomes%2Fideogram4-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimcomes%2Fideogram4-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimcomes%2Fideogram4-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimcomes","download_url":"https://codeload.github.com/vimcomes/ideogram4-editor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimcomes%2Fideogram4-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34491239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-art","dearpygui","ideogram","ideogram4","image-generation","prompt-editor","python"],"created_at":"2026-06-18T13:02:50.587Z","updated_at":"2026-06-18T13:02:51.261Z","avatar_url":"https://github.com/vimcomes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ideogram4 Layout Editor\n\n\u003e GUI layer editor for composing structured [Ideogram 4](https://ideogram.ai/) image-generation prompts\n\n![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)\n![License: MIT](https://img.shields.io/badge/license-MIT-green)\n![DearPyGui 2.3.1](https://img.shields.io/badge/DearPyGui-2.3.1-orange)\n[![Latest release](https://img.shields.io/github/v/release/vimcomes/ideogram4-editor)](https://github.com/vimcomes/ideogram4-editor/releases)\n\n![Ideogram4 Layout Editor](assets/screenshot_main.png)\n\n## What it is\n\nIdeogram 4 accepts structured JSON prompts where every region of the image is described separately with a bounding box. Writing these by hand is error-prone. This editor lets you draw bbox regions on a proportional canvas (like Photoshop's layer panel), set text/style properties per layer, and export a ready-to-paste JSON prompt in one click.\n\n## Example outputs\n\n| Sci-fi movie poster (`photo` mode) | ComfyUI arcade parody (`art` mode) |\n|---|---|\n| ![scifi](examples/scifi_poster.png) | ![comfyui](examples/comfyui_arcade.png) |\n\nPrompt files for both are in `examples/` — open them with File → Open to explore the layout.\n\n## Features\n\n- Draw and resize `text` / `obj` bbox layers on a proportional canvas\n- Layer panel with reorder (↑↓), delete, multi-layer support\n- Properties panel: description, color palette, optional text content\n- **Color picker** (`◐`) — visual hex color selection for any palette field; chosen color is appended comma-separated\n- **Reference image underlay** — load a PNG/JPG reference under the canvas with adjustable opacity, stretch/crop fit, and visibility toggle (editor-only, never written to JSON)\n\n![v0.2.0 — color picker and underlay](assets/screenshot_v0.2.0.png)\n- **Native OS file dialogs** — open/save/underlay use the system dialog (GTK on Linux, Win32 on Windows)\n- **Photo / Art style toggle** — correct key order per Ideogram 4 schema\n- Undo / redo (`Ctrl+Z` / `Ctrl+Y`)\n- Save / load JSON, copy prompt to clipboard\n- 8 resolution presets (9:16 portrait → 16:9 landscape)\n- RU / EN UI language switch\n- Dark theme (Catppuccin Mocha)\n- Draggable horizontal splitter between canvas and style fields\n\n## Install\n\n```bash\ngit clone https://github.com/vimcomes/ideogram4-editor.git\ncd ideogram4-editor\npython3 -m venv venv\nsource venv/bin/activate          # Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n## Run\n\n```bash\n./run.sh          # Linux / macOS  (creates venv automatically on first run)\nrun.bat           # Windows        (same auto-venv logic)\n```\n\n## How to use\n\n1. **Choose resolution** — pick a preset from the top-left dropdown (e.g. `9:16 1168×1712`)\n2. **Add layers** — click `⊕T` to add a text layer or `⊕O` for an object layer, then draw a bbox on the canvas\n3. **Edit properties** — select a layer and fill in *Description*, *Text* (for text layers), and *Color palette* in the right panel; click `◐` to pick a color visually\n4. **Add reference underlay** (optional) — click *Add* in the Underlay section of the left panel to load a PNG/JPG reference image under the canvas; adjust opacity and fit mode as needed\n5. **Fill style fields** — expand *Style description*, choose Art or Photo mode, fill in aesthetics / lighting / medium\n6. **Copy or save** — click `❐` to copy the JSON to clipboard, or `▽` to save to a file\n7. **Undo** — `Ctrl+Z` steps back one action at a time\n\n**Tips:**\n- Drag the horizontal bar between canvas and style fields to resize them\n- Long text strings in `text` layers should be split across multiple short bbox rows — the model handles short lines better\n- Load `examples/magazine_cover.json` or `examples/scifi_poster.json` to see a complete prompt\n\n## Prompt format\n\n```json\n{\n  \"high_level_description\": \"A product poster for a smartwatch\",\n  \"style_description\": {\n    \"aesthetics\": \"clean, minimal, soft shadows\",\n    \"lighting\": \"soft studio light, no hard shadows\",\n    \"medium\": \"photograph\",\n    \"photo\": \"85mm, f/2.8, shallow depth of field\"\n  },\n  \"compositional_deconstruction\": {\n    \"background\": \"Soft grey gradient\",\n    \"elements\": [\n      {\n        \"type\": \"obj\",\n        \"bbox\": [100, 200, 800, 800],\n        \"desc\": \"Smartwatch hero shot\",\n        \"color_palette\": [\"#1a1a2e\", \"#c0c0c0\"]\n      },\n      {\n        \"type\": \"text\",\n        \"bbox\": [820, 100, 880, 900],\n        \"text\": \"NOVA X1\",\n        \"desc\": \"Product name — bold white sans-serif\",\n        \"color_palette\": [\"#ffffff\"]\n      }\n    ]\n  }\n}\n```\n\n`bbox` is `[ymin, xmin, ymax, xmax]` in 0–1000 relative coordinates (resolution-independent).  \n`style_description` key order matters — the editor handles it automatically based on Art/Photo mode.\n\n## Development\n\n```bash\npip install -r requirements-dev.txt\npython -m pytest -q          # 68 tests\n```\n\n## Architecture\n\n| File | Responsibility |\n|------|----------------|\n| `state.py` | Global mutable state + canvas geometry |\n| `geometry.py` | Coordinate transforms, hit-test, mouse→canvas |\n| `handlers.py` | Mouse FSM (press → drag → release) + keyboard |\n| `toolbar.py` | Toolbar callbacks: add layer, new document, presets, i18n |\n| `ui.py` | DPG window layout (3-column: layers \\| canvas+fields \\| properties) |\n| `panels.py` | Layer list + properties panel + underlay panel |\n| `draw.py` | Drawlist rendering |\n| `colorwidget.py` | Color picker button and shared modal picker |\n| `underlay.py` | Reference image underlay (load, draw, fit modes) |\n| `prompt_io.py` | Save/load JSON, clipboard, overwrite confirmation |\n| `history.py` | Undo/redo |\n| `theme.py` | Global dark theme (Catppuccin Mocha) |\n| `i18n.py` | RU/EN strings |\n| `version.py` | App version (`__version__`) |\n| `main.py` | Entry point + render loop |\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimcomes%2Fideogram4-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimcomes%2Fideogram4-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimcomes%2Fideogram4-editor/lists"}