File size: 2,517 Bytes
7a854bb
f0d59b8
7a854bb
 
 
 
 
 
 
f0d59b8
 
 
 
 
 
 
 
 
7a854bb
 
f0d59b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: "StoryPage Creator: Text to Image MCP" 
emoji: πŸ“š
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: 5.33.0
app_file: app.py
pinned: false
short_description: Convert long-form text into pretty, styled, readable images. 
tags:
- mcp-server-track
- agent-demo-track
- text-to-image
- document-generation
- image-creation
- text-formatting
- visual-content
---

# StoryPage Creator: Your Text-to-Image Converter

This Gradio application converts any text content into a series of visually appealing, readable images. It serves as both an interactive web application and a Model Context Protocol (MCP) server, making it perfect for UI-based creation and automated workflows.

## ✨ Features

- **Multiple Output Formats**: Provides a user-friendly image **Gallery** for instant previews and downloads, alongside a **JSON** output with base64-encoded strings for easy API integration.
- **Rich Customization**:
    - **Font Family**: Choose from common fonts like Arial, Times New Roman, and more.
    - **Font Size**: Use the slider to find the perfect font size for readability.
    - **Aspect Ratio**: Select from standard image scales including 1:1 (Square), 16:9 (Widescreen), 9:16 (Vertical), 4:3 and 3:4.
    - **Background Styles**: Add a touch of personality with `lines`, `dots`, `grid`, or a `plain` background.
    - **Background Color**: Select from a palette of soft, easy-to-read background colors.
- **MCP Server Enabled**: Can be called as an API endpoint, returning structured JSON data for programmatic use.

## πŸš€ How to Use

### Interactive UI

1. **Paste Text**: Enter or paste your desired text content into the text box.
2. **Customize**: Use the controls on the left to adjust the style, font size, color, aspect ratio, and font family.
3. **Submit**: Click the "Submit" button to generate the images.
4. **Preview & Download**: The generated images will appear in the "Generated Images (Preview)" gallery. You can click on an image to view it in full size and use the download icon to save it.

## 🎬 Demo

### πŸ€– API / MCP Usage

This MCP server can be used both as a Gradio web interface and as an MCP server for AI agents. Simply provide your text content and select your preferred background style to generate formatted images,  it will bypass the visual gallery and return a clean JSON object.

**Example Input**:
```json
{
  "text_content": "Your text content here...",
  "style": "lines"
}
```

**Output**: Base64-encoded PNG image(s) ready for viewing or download