This directory contains a script for generating simple, presentation-friendly images for slides.
The generate-image.js script uses OpenAI's DALL-E model to generate simple, clean images with a single focused item, specifically designed for presentation slides.
Before using the script, make sure you have:
- Node.js installed
- Run
npm installin this directory to install dependencies - Set up the required API key in the
.envfile at the root of the repository:- For DALL-E:
OPENAI_API_KEY
- For DALL-E:
node generate-image.js -p "Your image description" -o "path/to/output.png"This will generate a simple, clean image with a single focused item using DALL-E, specifically designed for presentation slides.
-p, --prompt <text>: Text prompt for image generation (required)-o, --output <path>: Output path for the image (default: ./generated-image.png)--style <style>: Style of image to generate (options: simple, minimal, flat, icon, sketch; default: simple)-s, --size <size>: Size for the generated image (options: 1024x1024, 1024x1792, 1792x1024; default: 1024x1024)
-
Generate a simple, minimal image:
node generate-image.js -p "Infrastructure as Code" -o "presentation/images/iac.png" --style minimal
-
Generate a flat-style image:
node generate-image.js -p "Cloud infrastructure" -o "presentation/images/cloud.png" --style flat
-
Generate an icon-style image:
node generate-image.js -p "Terraform logo" -o "presentation/images/terraform.png" --style icon
To create simple, clean images with a single focused item for your presentation slides:
- For each slide, identify the ONE key concept that needs to be illustrated
- Create a clear, concise prompt that describes this single concept
- Keep your prompt focused on one main element to ensure clarity
- Run the script with the prompt and desired style
- The script will generate and save a presentation-friendly image with a single focused item
Example:
node generate-image.js -p "Benefits of Infrastructure as Code" -o "presentation/images/benefits-of-iac.png" --style minimalThis will create a simple, clean image with a single focused item that clearly illustrates the concept of "Benefits of Infrastructure as Code" in a minimal style, perfect for presentation slides.