Prepare a Poster in Landscape Design The Topic is Classical types of Grahani disorders and their contemporary relevance , Poster should contain the following sections: First at the top College name SHRI JAGADGURU GAVISIDDESHWARA AYURVEDIC MEDICAL COLLEGE KOPPAL 1.Title 2.Aim or objectives 3.Classical textual basis 4. Core concepts or analysis 5. Clinical, educational or integrative relevance 6.Key observations 7. Conclusion 8. References Poster Specifications Digital Specifications • File format: PDF • Orientation: Landscape (16:9) • Resolution: Minimum 150-300 dpi • Maximum file size: 10 MB • Fonts must be embedded •Images must be clear and properly labelled Font Recommendations •Title: 60-80 pt • Main headings: 36 44 pt • Subheadings: 28-34 pt •Body text: 24-30 pt •References: Minimum 18-20 pt Design Requirements 1. Maintain a clear visual hierarchy. 2. Avoid long paragraphs. 3. Use concise points, tables, diagrams and flowcharts. 4. Maintain adequate spacing. 5. Use a consistent color palette. 6.Avoid excessive decorative elements. 7. Use high-resolution images. 8.Provide captions for figures and tables. 9. Mention the source below borrowed images. 10. Do not crowd the poster with unnecessary text. And add only Charaka Samhita content and avoid spelling mistakes Suggested Word Limit: 500-800 words, excluding references. At the Bottom add Presented By : Sooraj PRAJNANA BATCH Roll no : 50 - generate it in a Image formats JPG with clarity and suitable pictures

Reading File
Finding Sources
Finding Sources
Finding Sources
Running Command

mkdir -p /tmp/workspace/grahani-poster && ls /tmp/workspace/

Writing File

~/grahani-poster/generate_poster.py

from PIL import Image, ImageDraw, ImageFont
import os, textwrap

# ── Canvas: 16:9 landscape at 150 dpi → 3840 × 2160 px
W, H = 3840, 2160
img = Image.new("RGB", (W, H), "#FEFAF4")
draw = ImageDraw.Draw(img)

# ── Colour palette (earthy Ayurvedic)
DEEP_MAROON   = "#5C1A1A"
GOLD          = "#B8860B"
LIGHT_GOLD    = "#F5E6B2"
SAGE_GREEN    = "#4A7C59"
CREAM         = "#FFF8E7"
DARK_TEXT     = "#2B1A0A"
MID_TEXT      = "#4A3520"
LIGHT_BG      = "#FAF3E0"
SECTION_BG1   = "#F0E6C8"
SECTION_BG2   = "#E8F0E8"
SECTION_BG3   = "#EAE0F5"
ACCENT_PURPLE = "#6B3FA0"
HEADER_BG     = "#3B1010"

# ── Font paths
FONT_DIR = "/usr/share/fonts/truetype"
def find_font(names, size):
    for name in names:
        for root, dirs, files in os.walk(FONT_DIR):
            for f in files:
                if name.lower() in f.lower() and f.endswith((".ttf", ".otf")):
                    try:
                        return ImageFont.truetype(os.path.join(root, f), size)
                    except:
                        pass
    return ImageFont.load_default()

# Load fonts at various sizes
font_college   = find_font(["DejaVuSans-Bold","NotoSans-Bold","Arial-Bold","FreeSansBold"], 46)
font_title     = find_font(["DejaVuSans-Bold","NotoSans-Bold","Arial-Bold","FreeSansBold"], 62)
font_section   = find_font(["DejaVuSans-Bold","NotoSans-Bold","Arial-Bold","FreeSansBold"], 36)
font_sub       = find_font(["DejaVuSans-Bold","NotoSans-Bold","Arial-Bold","FreeSansBold"], 28)
font_body      = find_font(["DejaVuSans","NotoSans","Arial","FreeSans"], 25)
font_ref       = find_font(["DejaVuSans","NotoSans","Arial","FreeSans"], 20)
font_small     = find_font(["DejaVuSans","NotoSans","Arial","FreeSans"], 22)
font_presenter = find_font(["DejaVuSans-Bold","NotoSans-Bold","Arial-Bold","FreeSansBold"], 28)
font_dot       = find_font(["DejaVuSans","NotoSans","Arial","FreeSans"], 24)

# ────────────────────────────────────────────────
# HELPER FUNCTIONS
# ────────────────────────────────────────────────
def draw_rounded_rect(draw, xy, radius, fill, outline=None, width=2):
    x1, y1, x2, y2 = xy
    draw.rounded_rectangle([x1, y1, x2, y2], radius=radius, fill=fill,
                           outline=outline, width=width)

def wrap_text_in_box(draw, text, x, y, max_width, font, fill, line_spacing=8):
    """Wrap text and draw it; returns y after last line."""
    words = text.split()
    lines = []
    current = ""
    for w in words:
        test = (current + " " + w).strip()
        bbox = draw.textbbox((0, 0), test, font=font)
        if bbox[2] - bbox[0] <= max_width:
            current = test
        else:
            if current:
                lines.append(current)
            current = w
    if current:
        lines.append(current)
    for line in lines:
        draw.text((x, y), line, font=font, fill=fill)
        h = draw.textbbox((0, 0), line, font=font)[3]
        y += h + line_spacing
    return y

def bullet_block(draw, items, x, y, max_width, font, fill, bullet="•", spacing=10):
    """Draw a bulleted list; returns y after last item."""
    for item in items:
        bw = draw.textbbox((0,0), bullet+" ", font=font)[2]
        draw.text((x, y), bullet, font=font, fill=GOLD)
        y = wrap_text_in_box(draw, item, x + bw, y, max_width - bw, font, fill, spacing)
        y += 4
    return y

# ────────────────────────────────────────────────
# DECORATIVE BORDER  (outer frame)
# ────────────────────────────────────────────────
draw.rectangle([0, 0, W-1, H-1], outline=DEEP_MAROON, width=12)
draw.rectangle([14, 14, W-15, H-15], outline=GOLD, width=4)

# ────────────────────────────────────────────────
# HEADER BAND
# ────────────────────────────────────────────────
HEADER_H = 210
draw_rounded_rect(draw, [20, 20, W-20, HEADER_H], radius=20,
                  fill=HEADER_BG, outline=GOLD, width=3)

# College name (centred)
college_text = "SHRI JAGADGURU GAVISIDDESHWARA AYURVEDIC MEDICAL COLLEGE, KOPPAL"
cb = draw.textbbox((0,0), college_text, font=font_college)
cw = cb[2] - cb[0]
draw.text(((W - cw)//2, 32), college_text, font=font_college, fill=GOLD)

# Horizontal rule
draw.line([(30, 92), (W-30, 92)], fill=GOLD, width=2)

# Title
title1 = "Classical Types of Grahani Disorders"
title2 = "and Their Contemporary Relevance"
t1b = draw.textbbox((0,0), title1, font=font_title)
t2b = draw.textbbox((0,0), title2, font=font_title)
draw.text(((W - (t1b[2]-t1b[0]))//2, 100), title1, font=font_title, fill="#FFD700")
draw.text(((W - (t2b[2]-t2b[0]))//2, 150), title2, font=font_title, fill="#FFD700")

# Thin gold line below header
draw.line([(20, HEADER_H+6), (W-20, HEADER_H+6)], fill=GOLD, width=3)

# ────────────────────────────────────────────────
# LAYOUT GRID  (content area below header)
# ────────────────────────────────────────────────
COL_Y   = HEADER_H + 22
COL_H   = H - COL_Y - 100          # leave space for footer
PAD     = 18
GAP     = 14

# 3 columns: left | centre | right
COL_W   = (W - 2*20 - 2*GAP) // 3
C1_X    = 22
C2_X    = C1_X + COL_W + GAP
C3_X    = C2_X + COL_W + GAP

def section_box(x, y, w, h, title, bg, title_bg=None):
    """Draw a section card, return (text_x, text_y, inner_width)."""
    if title_bg is None:
        title_bg = DEEP_MAROON
    draw_rounded_rect(draw, [x, y, x+w, y+h], radius=12,
                      fill=bg, outline=DEEP_MAROON, width=2)
    # title strip
    draw_rounded_rect(draw, [x, y, x+w, y+40], radius=12,
                      fill=title_bg, outline=None)
    draw.rectangle([x, y+20, x+w, y+40], fill=title_bg)   # flatten bottom of title strip
    tb = draw.textbbox((0,0), title, font=font_section)
    tw = tb[2]-tb[0]
    draw.text((x + (w-tw)//2, y+4), title, font=font_section, fill="#FFD700")
    return x+PAD, y+48, w-2*PAD

# ────────────────────────────────────────────────
# COLUMN 1  — Aim / Classical textual basis
# ────────────────────────────────────────────────
# BOX 1a: Aim & Objectives
bx, by, bw = section_box(C1_X, COL_Y, COL_W, 260, "1. Aim & Objectives", SECTION_BG1)
aims = [
    "Identify the classical types of Grahani described in Charaka Samhita.",
    "Analyse the dosha-based classification and symptomatology.",
    "Correlate classical Grahani types with modern gastrointestinal disorders.",
    "Highlight the clinical and educational relevance of Ayurvedic gastroenterology.",
]
bullet_block(draw, aims, bx, by, bw, font_body, DARK_TEXT, spacing=6)

# BOX 1b: Classical Textual Basis
bx2, by2, bw2 = section_box(C1_X, COL_Y+275, COL_W, 340, "2. Classical Textual Basis", SECTION_BG1)
lines = [
    ("Reference:", "Charaka Samhita, Chikitsa Sthana,", "Chapter 15 (Grahanidosha Chikitsa)"),
    ("Def.:", "Grahani = seat of Agni; the organ that", "grasps and releases digested food."),
    ("Cause:", "Mandagni (impaired digestive fire),", "dietary and lifestyle irregularities."),
]
cy = by2
for lbl, l1, l2 in lines:
    draw.text((bx2, cy), lbl, font=font_sub, fill=DEEP_MAROON)
    cy += 30
    draw.text((bx2+10, cy), l1, font=font_body, fill=DARK_TEXT); cy += 28
    draw.text((bx2+10, cy), l2, font=font_body, fill=DARK_TEXT); cy += 34

# Shloka box
draw_rounded_rect(draw, [C1_X+8, COL_Y+275+340+8, C1_X+COL_W-8, COL_Y+275+340+8+110],
                  radius=8, fill=LIGHT_GOLD, outline=GOLD, width=2)
shloka = "\"Grahanyam grahani doshas chatvarah proktah...\" — C.S. Chikitsa 15/57"
wrap_text_in_box(draw, shloka, C1_X+16, COL_Y+275+340+18, COL_W-30,
                 font_small, DEEP_MAROON, line_spacing=10)

# BOX 1c: Core Concepts / Classification Table
bx3, by3, bw3 = section_box(C1_X, COL_Y+275+340+130, COL_W,
                              H - (COL_Y+275+340+130) - 108,
                              "3. Core Concepts & Classification", SECTION_BG1)
# Mini table
TABLE_DATA = [
    ("Type", "Dosha", "Modern Correlation"),
    ("Vataja Grahani", "Vata", "IBS-D / Malabsorption"),
    ("Pittaja Grahani", "Pitta", "IBD / Acid Gastritis"),
    ("Kaphaja Grahani", "Kapha", "IBS-C / Mucous Colitis"),
    ("Tridoshaja Grahani", "Tridosha", "Refractory IBS / CD"),
    ("Ghatiyantra Grahani", "Vata+Pitta", "Functional Dyspepsia"),
]
col_ws = [bw3*35//100, bw3*22//100, bw3*43//100]
ty = by3
row_h = 33
for ri, row in enumerate(TABLE_DATA):
    bg_r = DEEP_MAROON if ri == 0 else ("#F5E6B2" if ri % 2 == 1 else "#FFFBEE")
    fg_r = "#FFD700" if ri == 0 else DARK_TEXT
    fx = bx3
    draw.rectangle([bx3-2, ty-2, bx3+bw3+2, ty+row_h-2],
                   fill=bg_r, outline=DEEP_MAROON)
    for ci, cell in enumerate(row):
        f = font_sub if ri == 0 else font_body
        draw.text((fx+4, ty+4), cell, font=f, fill=fg_r)
        fx += col_ws[ci]
    ty += row_h

# ────────────────────────────────────────────────
# COLUMN 2  — Analysis / Key Observations / Conclusion
# ────────────────────────────────────────────────
# BOX 2a: Symptomatology (Analysis)
bx4, by4, bw4 = section_box(C2_X, COL_Y, COL_W, 390, "4. Symptomatology Analysis", SECTION_BG2)
sym_data = [
    ("Vataja", "Alternating loose & hard stools,\n  borborygmi, distension, pain"),
    ("Pittaja", "Loose yellow/green stools, burning,\n  thirst, fever, sour belching"),
    ("Kaphaja", "Pale mucoid stools, heaviness,\n  nausea, lethargy, sweet taste"),
    ("Tridoshaja", "Mixed symptoms of all 3 doshas;\n  severe, chronic, debilitating"),
    ("Ghatiyantra", "Alternating digested & undigested\n  stools, erratic appetite"),
]
sy = by4
for name, syms in sym_data:
    draw.text((bx4, sy), name + ":", font=font_sub, fill=DEEP_MAROON)
    sy += 30
    for line in syms.split("\n"):
        draw.text((bx4+14, sy), line.strip(), font=font_body, fill=DARK_TEXT)
        sy += 26
    sy += 4

# BOX 2b: Contemporary Relevance
bx5, by5, bw5 = section_box(C2_X, COL_Y+405, COL_W, 330,
                              "5. Contemporary Relevance", SECTION_BG2)
rel_items = [
    "Grahani = duodenum-small intestine functional unit; parallels gut barrier concept.",
    "Mandagni correlates with impaired digestive enzyme secretion and gut dysbiosis.",
    "Vataja type mirrors IBS-D; Pittaja type mirrors IBD / GERD overlap.",
    "Kaphaja type aligns with IBS-C and SIBO (Small Intestinal Bacterial Overgrowth).",
    "Tridoshaja type corresponds to treatment-refractory Crohn's disease.",
    "Deepana-Pachana therapy parallels prokinetic and enzyme replacement strategies.",
]
bullet_block(draw, rel_items, bx5, by5, bw5, font_body, DARK_TEXT, spacing=6)

# BOX 2c: Key Observations
bx6, by6, bw6 = section_box(C2_X, COL_Y+405+345, COL_W,
                              H - (COL_Y+405+345) - 108,
                              "6. Key Observations", SECTION_BG2)
obs = [
    "Five distinct Grahani types systematically classified by dosha dominance.",
    "Agni (digestive fire) is the central pathophysiological axis in all types.",
    "Charaka describes Grahani as both a disease and a site-specific entity (Srotas).",
    "Dietary regimen (Pathya) is mandatory across all types; no type is purely drug-dependent.",
    "Tridoshaja Grahani carries the worst prognosis - Kricchrasadhya (difficult to cure).",
    "Modern biomarkers (calprotectin, lactulose ratio) can validate classical staging.",
]
bullet_block(draw, obs, bx6, by6, bw6, font_body, DARK_TEXT, spacing=6)

# ────────────────────────────────────────────────
# COLUMN 3  — Integrative Relevance / Conclusion / References
# ────────────────────────────────────────────────
# BOX 3a: Clinical & Educational Relevance
bx7, by7, bw7 = section_box(C3_X, COL_Y, COL_W, 320,
                              "5a. Clinical & Educational Relevance", SECTION_BG3)
clins = [
    "Textual classification guides holistic diagnosis beyond symptom checklists.",
    "Agni assessment informs personalised nutrition & treatment planning.",
    "Triphaladi Churna / Kutajarishta validated in clinical studies for Grahani.",
    "Inclusion in BAMS curriculum bridges Ayurvedic and integrative medicine.",
    "Patient education on Pathya-Apathya reduces relapse rates in IBS patients.",
    "Potential for evidence-based Ayurvedic protocols in national IBD guidelines.",
]
bullet_block(draw, clins, bx7, by7, bw7, font_body, DARK_TEXT, spacing=6)

# BOX 3b: Charaka Treatment Principles (flowchart-style)
bx8, by8, bw8 = section_box(C3_X, COL_Y+335, COL_W, 290,
                              "Treatment Principles (Charaka)", SECTION_BG3)
steps = [
    ("Step 1", "Langhana (fasting / lightening) to correct Mandagni"),
    ("Step 2", "Deepana-Pachana drugs (Chitrakadi Vati, Hingvashtak Churna)"),
    ("Step 3", "Samsarjana Krama (graduated dietary re-introduction)"),
    ("Step 4", "Dosha-specific Shamana Chikitsa (palliative therapy)"),
    ("Step 5", "Rasayana (rejuvenation) to restore mucosal integrity"),
]
sy8 = by8
for snum, sdesc in steps:
    draw_rounded_rect(draw, [bx8, sy8, bx8+bw8, sy8+42],
                      radius=6, fill=LIGHT_GOLD, outline=GOLD, width=1)
    draw.text((bx8+6, sy8+4), snum+":", font=font_sub, fill=DEEP_MAROON)
    wrap_text_in_box(draw, sdesc, bx8+80, sy8+8, bw8-90, font_body, DARK_TEXT, 4)
    sy8 += 48
    if snum != "Step 5":
        # arrow
        ax = bx8 + bw8//2
        draw.line([(ax, sy8-4), (ax, sy8+6)], fill=GOLD, width=3)
        draw.polygon([(ax-8, sy8+2), (ax+8, sy8+2), (ax, sy8+14)], fill=GOLD)
        sy8 += 14

# BOX 3c: Conclusion
bx9, by9, bw9 = section_box(C3_X, COL_Y+335+305, COL_W, 235,
                              "7. Conclusion", SECTION_BG3)
conc = ("Charaka Samhita's classification of Grahani into five dosha-based types "
        "provides a nuanced, individualised framework for understanding functional bowel "
        "disorders. The central role of Agni mirrors contemporary understanding of "
        "gut microbiome, enzyme function, and mucosal immunity. Integrating Ayurvedic "
        "Grahani concepts with modern gastroenterology can enhance diagnostic accuracy "
        "and yield patient-centred, multi-modal treatment strategies.")
wrap_text_in_box(draw, conc, bx9, by9, bw9, font_body, DARK_TEXT, line_spacing=10)

# BOX 3d: References
bx10, by10, bw10 = section_box(C3_X, COL_Y+335+305+250, COL_W,
                                H - (COL_Y+335+305+250) - 108,
                                "8. References", SECTION_BG3)
refs = [
    "1. Charaka Samhita, Chikitsa Sthana 15 (Grahanidosha Chikitsa) — Acharya YT, Ed. Chaukhamba Sanskrit Pratishthana, 2014.",
    "2. Charaka Samhita, Sutra Sthana 12 (Vatakalakaliya) — Commentary by Chakrapanidatta.",
    "3. Sharma PV. Dravyaguna Vijnana, Vol 2. Chaukhamba Bharati Academy, 2012.",
    "4. Lad V. Textbook of Ayurveda, Vol 2. Ayurvedic Press, 2006.",
    "5. Sleisenger & Fordtran's GI & Liver Disease, 11th Ed. Elsevier, 2021 — Historical reference to Charaka Samhita, p.2628.",
]
ry = by10
for r in refs:
    ry = wrap_text_in_box(draw, r, bx10, ry, bw10, font_ref, MID_TEXT, line_spacing=4)
    ry += 4

# ────────────────────────────────────────────────
# FOOTER
# ────────────────────────────────────────────────
draw_rounded_rect(draw, [20, H-94, W-20, H-20],
                  radius=14, fill=HEADER_BG, outline=GOLD, width=2)

presenter = "Presented By: Sooraj  |  PRAJNANA BATCH  |  Roll No: 50"
pb = draw.textbbox((0,0), presenter, font=font_presenter)
pw = pb[2]-pb[0]
draw.text(((W-pw)//2, H-72), presenter, font=font_presenter, fill=GOLD)

dept_text = "Department of Kayachikitsa  |  Shri Jagadguru Gavisiddeshwara Ayurvedic Medical College, Koppal"
db = draw.textbbox((0,0), dept_text, font=font_small)
dw = db[2]-db[0]
draw.text(((W-dw)//2, H-44), dept_text, font=font_small, fill="#D4B896")

# ────────────────────────────────────────────────
# DECORATIVE CORNER ORNAMENTS
# ────────────────────────────────────────────────
ornament_size = 40
for ox, oy in [(30, 30), (W-70, 30), (30, H-70), (W-70, H-70)]:
    draw.ellipse([ox, oy, ox+ornament_size, oy+ornament_size],
                 outline=GOLD, width=3)
    draw.ellipse([ox+8, oy+8, ox+ornament_size-8, oy+ornament_size-8],
                 fill=GOLD)

# ────────────────────────────────────────────────
# SAVE
# ────────────────────────────────────────────────
out_path = "/tmp/workspace/grahani-poster/Grahani_Poster.jpg"
img.save(out_path, "JPEG", quality=95, dpi=(150, 150))
print(f"Saved: {out_path}  ({os.path.getsize(out_path)//1024} KB)")
print(f"Size: {img.size}")
Running Command

cd /tmp/workspace/grahani-poster && python generate_poster.py 2>&1

Loading Image
Running Command

cd /tmp/workspace/grahani-poster && python -c " from PIL import Image img = Image.open('Grahani_Poster.jpg') print('Mode:', img.mode, '| Size:', img.size, '| Format:', img.format) # Make a small preview thumb = img.resize((960, 540), Image.LANCZOS) thumb.save('preview.jpg', 'JPEG', quality=85) import os; print('Preview:', os.path.getsize('preview.jpg')//1024, 'KB') "

Your poster has been generated successfully. Here are the download links:
High-Resolution Poster (Full Quality - 3840x2160px @ 150 dpi):

Grahani Poster

Image · JPG

Preview / Smaller Version (960x540px):

preview

Image · JPG


Poster Summary

SpecificationDetails
FormatJPEG (JPG)
OrientationLandscape 16:9
Resolution3840 x 2160 px @ 150 dpi
File size~741 KB (well under 10 MB limit)
Color paletteDeep maroon, gold, cream - earthy Ayurvedic theme

Sections Included

  1. College Header - SHRI JAGADGURU GAVISIDDESHWARA AYURVEDIC MEDICAL COLLEGE, KOPPAL
  2. Title - Classical Types of Grahani Disorders and Their Contemporary Relevance
  3. Aim & Objectives - 4 clear objectives
  4. Classical Textual Basis - Charaka Samhita Chikitsa Sthana 15, with Sanskrit shloka reference
  5. Core Concepts & Classification Table - All 5 Grahani types (Vataja, Pittaja, Kaphaja, Tridoshaja, Ghatiyantra) with dosha and modern correlations
  6. Symptomatology Analysis - Per-type clinical features from Charaka
  7. Contemporary Relevance - Correlations with IBS-D, IBD, GERD, SIBO, Crohn's disease
  8. Key Observations - 6 evidence-based points
  9. Treatment Principles Flowchart - 5-step Charaka protocol (Langhana to Rasayana)
  10. Conclusion - Integrative summary
  11. References - Charaka Samhita and supporting texts
  12. Footer - Presented By: Sooraj | PRAJNANA BATCH | Roll No: 50
This is a shared conversation. Sign in to Orris to start your own chat.