PanelForge
Components

Frame Component

The Frame component is the fundamental building block in PanelForge for creating comic panels. It handles individual image processing, including borders, padding, and styling to create comic-style frames.

Overview

A Frame node processes images into comic-style panels with borders, padding, and captions.

Frame Component Example

Parameters

Required

  • image (IMAGE): Input image tensor (NHWC format)
  • frame_width (INT): Width in pixels (64-2048, default: 512)
  • frame_height (INT): Height in pixels (64-2048, default: 512)
  • border_width (INT): Border thickness (0-50px, default: 3)
  • border_style: Choose from "thin", "medium", "thick", or "custom"
  • padding (INT): Space between border and image (0-100px, default: 10)
  • border_color: Border color (RGB)

Optional

  • background: Background color
  • caption: Text caption (supports multiline)
  • caption_style: Caption styling options
  • previous_frame: Link to previous frame for flow control

Usage Example

frame = FrameNode().process_frame(
    image=input_image,
    frame_width=512,
    frame_height=512,
    border_width=3,
    border_style="medium",
    padding=10,
    border_color={"red": 0, "green": 0, "blue": 0}
)

Technical Details

Output

  • frame: Processed image with metadata (dimensions, styles, caption)
  • preview: Preview image (max 512px width)

Image Processing

  • Maintains aspect ratio
  • High-quality scaling (LANCZOS)
  • Efficient memory handling
  • Normalized color values [0-1]

Border Styles

  • thin: 2px
  • medium: 4px
  • thick: 6px
  • custom: Uses specified width

Best Practices

  1. Use high-quality source images
  2. Keep consistent border styles across related frames
  3. Use padding for visual breathing room
  4. Keep captions concise and readable

On this page