import os from PIL import Image, ImageDraw, ImageFont OUTPUT_DIR = r"c:\Users\abhil\Desktop\Medasset_ai\docs\blogs\images" os.makedirs(OUTPUT_DIR, exist_ok=True) # Color Palette NAVY = "#102C52" BLUE = "#2E5C9A" TEAL = "#008E95" PALE_BLUE = "#E8EFF7" WHITE = "#FFFFFF" CLOUD_WHITE = "#F8FAFC" DARK_GRAY = "#1E293B" MUTED_GRAY = "#64748B" LIGHT_BORDER = "#CBD5E1" SUCCESS_GREEN = "#10B981" WARNING_AMBER = "#F59E0B" CRITICAL_RED = "#EF4444" def get_font(size, bold=False): font_path = "C:/Windows/Fonts/segoeuib.ttf" if bold else "C:/Windows/Fonts/segoeui.ttf" if not os.path.exists(font_path): font_path = "C:/Windows/Fonts/arialbd.ttf" if bold else "C:/Windows/Fonts/arial.ttf" return ImageFont.truetype(font_path, size) def draw_card(draw, x, y, w, h, fill, border=None, radius=12): draw.rounded_rectangle([x, y, x + w, y + h], radius=radius, fill=fill, outline=border, width=2 if border else 0) # ========================================== # 1. Blog 1 Hero Image # ========================================== def create_blog1_hero(): w, h = 1200, 630 im = Image.new("RGB", (w, h), NAVY) draw = ImageDraw.Draw(im) # Top brand bar draw.rectangle([0, 0, w, 8], fill=TEAL) # Sub-header / Category Tag draw_card(draw, 60, 40, 260, 36, fill=BLUE, radius=18) draw.text((75, 47), "MEDIASSET AI * INSIGHTS", fill=WHITE, font=get_font(14, bold=True)) # Main Headline draw.text((60, 95), "How AI Is Transforming", fill=WHITE, font=get_font(42, bold=True)) draw.text((60, 148), "Hospital Asset Management", fill=TEAL, font=get_font(42, bold=True)) # Subtitle / Descriptor draw.text((60, 210), "AI-Powered Hospital Asset & Biomedical Maintenance Management Software", fill=PALE_BLUE, font=get_font(18, bold=True)) draw.text((60, 238), "Every Asset Matters. Every Minute Counts. | From Reactive Repairs to Continuous Asset Intelligence", fill=LIGHT_BORDER, font=get_font(15)) # KPI Metrics Row (4 Cards) metrics = [ ("99.8%", "Fleet Uptime", "Critical ICU & OT Assets", SUCCESS_GREEN), ("42%", "Faster MTTR", "Automated SLA Escalation", TEAL), ("100%", "NABH Adherence", "Audit-Ready Digital Logs", WHITE), ("22%", "Lower AMC Spend", "Predictive Contract Renewal", WARNING_AMBER) ] card_w = 250 gap = 26 start_x = 60 card_y = 285 card_h = 135 for i, (val, title, desc, color) in enumerate(metrics): cx = start_x + i * (card_w + gap) draw_card(draw, cx, card_y, card_w, card_h, fill="#163968", border=BLUE, radius=10) draw.text((cx + 20, card_y + 15), val, fill=color, font=get_font(36, bold=True)) draw.text((cx + 20, card_y + 65), title, fill=WHITE, font=get_font(17, bold=True)) draw.text((cx + 20, card_y + 95), desc, fill=LIGHT_BORDER, font=get_font(13)) # Architecture Overview Bottom Banner draw_card(draw, 60, 445, 1080, 140, fill=WHITE, radius=12) draw.text((85, 462), "THE BIOMEDICAL ASSET INTELLIGENCE CORE", fill=NAVY, font=get_font(16, bold=True)) draw.text((85, 485), "Deterministic algorithms replacing opaque black-boxes with clinical defensibility:", fill=MUTED_GRAY, font=get_font(13)) # 3 Steps steps = [ ("1. Telemetry & Inventory", "Real-time status, 19 DB tables, sub-35ms API"), ("2. Maintenance Closed-Loop", "SLA tracking, BME assignment, verification"), ("3. Predictive TCO Intelligence", "50% Uptime + 20% PM + 15% Resp + 15% Recur") ] step_w = 325 step_x = 85 for i, (stitle, ssub) in enumerate(steps): sx = step_x + i * (step_w + 25) draw_card(draw, sx, 515, step_w, 52, fill=PALE_BLUE, border=BLUE, radius=8) draw.text((sx + 12, 522), stitle, fill=NAVY, font=get_font(14, bold=True)) draw.text((sx + 12, 542), ssub, fill=DARK_GRAY, font=get_font(11)) im.save(os.path.join(OUTPUT_DIR, "blog1_ai_hospital_asset_management_hero.png"), quality=95) print("Created blog1_ai_hospital_asset_management_hero.png") # ========================================== # 2. Blog 1 Architecture Infographic # ========================================== def create_blog1_infographic(): w, h = 1200, 675 im = Image.new("RGB", (w, h), CLOUD_WHITE) draw = ImageDraw.Draw(im) # Top Header draw.rectangle([0, 0, w, 90], fill=NAVY) draw.text((60, 20), "Biomedical Asset Intelligence vs. Generic Asset Tracking", fill=WHITE, font=get_font(28, bold=True)) draw.text((60, 58), "Why Healthcare Organizations Require Clinical Workflows, Not Just Barcode Scanners", fill=PALE_BLUE, font=get_font(15)) # Comparison Columns Header col_w = 520 draw_card(draw, 60, 115, col_w, 50, fill="#E2E8F0", border=LIGHT_BORDER, radius=8) draw.text((85, 128), "GENERIC ASSET TRACKING (IT/Office Tools)", fill=MUTED_GRAY, font=get_font(16, bold=True)) draw_card(draw, 620, 115, col_w, 50, fill=BLUE, radius=8) draw.text((645, 128), "MEDIASSET AI (Biomedical Intelligence Platform)", fill=WHITE, font=get_font(16, bold=True)) rows = [ ("Asset Scope", "Static items (laptops, chairs, desks, printers).\nTracks simple barcode, room assignment, serial no.", "Life-support and diagnostic medical equipment.\nTracks clinical risk class, calibration, OEM, warranty, PM.", CRITICAL_RED, SUCCESS_GREEN), ("Breakdown Workflow", "Generic helpdesk ticketing with no clinical urgency.\nNo medical SLA, no tripartite handover.", "Direct clinical escalation with urgency badges.\nDeterministic SLA breach countdown and nurse sign-off.", CRITICAL_RED, SUCCESS_GREEN), ("Regulatory Rigor", "Non-compliant with healthcare audit standards.\nManual record gathering during hospital inspections.", "100% NABH 5th Ed, AERB, ISO 13485 audit defensible.\nInstant traceable calibration and maintenance certificates.", CRITICAL_RED, SUCCESS_GREEN), ("Lifecycle & Costs", "Simple straight-line book depreciation.\nBlind to clinical downtime, spare parts, and AMC load.", "Predictive Total Cost of Ownership (TCO) and Buy vs Rent.\nEquipment Efficiency Score: Uptime, PM adherence, repairs.", CRITICAL_RED, SUCCESS_GREEN) ] y_pos = 180 row_h = 105 for title, generic_text, bme_text, c_bad, c_good in rows: draw.text((60, y_pos - 18), title.upper(), fill=NAVY, font=get_font(13, bold=True)) draw_card(draw, 60, y_pos, col_w, row_h, fill=WHITE, border=LIGHT_BORDER, radius=8) draw.rectangle([60, y_pos, 66, y_pos + row_h], fill=c_bad) draw.multiline_text((80, y_pos + 16), generic_text, fill=DARK_GRAY, font=get_font(13), spacing=6) draw_card(draw, 620, y_pos, col_w, row_h, fill=WHITE, border=TEAL, radius=8) draw.rectangle([620, y_pos, 626, y_pos + row_h], fill=c_good) draw.multiline_text((640, y_pos + 16), bme_text, fill=NAVY, font=get_font(13), spacing=6) y_pos += row_h + 26 im.save(os.path.join(OUTPUT_DIR, "blog1_asset_intelligence_architecture.png"), quality=95) print("Created blog1_asset_intelligence_architecture.png") # ========================================== # 3. Blog 2 Hero Image # ========================================== def create_blog2_hero(): w, h = 1200, 630 im = Image.new("RGB", (w, h), NAVY) draw = ImageDraw.Draw(im) # Top brand bar draw.rectangle([0, 0, w, 8], fill=TEAL) # Category Tag draw_card(draw, 60, 40, 320, 36, fill=BLUE, radius=18) draw.text((75, 47), "BIOMEDICAL ENGINEERING * CMMS", fill=WHITE, font=get_font(14, bold=True)) # Title draw.text((60, 95), "Why Hospitals Need Intelligent", fill=WHITE, font=get_font(40, bold=True)) draw.text((60, 145), "Biomedical Equipment Maintenance Software", fill=TEAL, font=get_font(40, bold=True)) # Subtitle draw.text((60, 205), "Product Descriptor: AI-Powered Hospital Asset & Biomedical Maintenance Management Software", fill=PALE_BLUE, font=get_font(17, bold=True)) draw.text((60, 233), "Brand Promise: Understand what equipment you own, where it is, what maintenance it needs, and what it costs.", fill=LIGHT_BORDER, font=get_font(15)) # Closed-Loop 5-Stage Maintenance Workflow Visualization draw_card(draw, 60, 280, 1080, 305, fill="#163968", border=BLUE, radius=12) draw.text((85, 300), "THE CLOSED-LOOP CLINICAL MAINTENANCE ENGINE", fill=WHITE, font=get_font(18, bold=True)) draw.text((85, 325), "Guaranteed audit defensibility and zero communication gaps across hospital departments:", fill=LIGHT_BORDER, font=get_font(13)) stages = [ ("01", "Breakdown Logged", "Clinical user / Nurse logs fault with image attachment & urgency"), ("02", "Instant Triage", "Auto-alert to BME, SLA countdown timer triggered"), ("03", "BME Assignment", "Biomedical engineer investigates root cause & spares"), ("04", "Restoration & Test", "Electrical safety & functional calibration verification"), ("05", "Tripartite Sign-off", "Clinical + BME + Management audit-locked approval") ] card_w = 194 gap = 14 for i, (num, stitle, sdesc) in enumerate(stages): cx = 85 + i * (card_w + gap) draw_card(draw, cx, 360, card_w, 195, fill=WHITE, border=TEAL, radius=8) draw.ellipse([cx + 15, 375, cx + 55, 415], fill=NAVY) draw.text((cx + 25, 385), num, fill=TEAL, font=get_font(16, bold=True)) draw.text((cx + 15, 430), stitle, fill=NAVY, font=get_font(15, bold=True)) draw.multiline_text((cx + 15, 460), sdesc, fill=DARK_GRAY, font=get_font(12), spacing=4) im.save(os.path.join(OUTPUT_DIR, "blog2_intelligent_biomedical_maintenance_hero.png"), quality=95) print("Created blog2_intelligent_biomedical_maintenance_hero.png") # ========================================== # 4. Blog 2 Compliance Framework # ========================================== def create_blog2_compliance(): w, h = 1200, 675 im = Image.new("RGB", (w, h), CLOUD_WHITE) draw = ImageDraw.Draw(im) # Header draw.rectangle([0, 0, w, 90], fill=NAVY) draw.text((60, 20), "Hospital Biomedical Regulatory Compliance Architecture", fill=WHITE, font=get_font(28, bold=True)) draw.text((60, 58), "How Intelligent Maintenance Software Safeguards NABH, ISO, and AERB Accreditations", fill=PALE_BLUE, font=get_font(15)) pillars = [ ("NABH 5th Edition (FMS)", "Facility Safety Standards", ["Mandatory preventive maintenance adherence", "Calibrated diagnostic measurement tools", "Documented equipment downtime & MTTR", "Hazards & safety incident audit trails"], BLUE), ("ISO 13485 Quality", "Medical Device Traceability", ["Complete lifecycle history per serial number", "OEM certified service engineer tracking", "Validated spare parts replacement records", "Equipment decommission criteria"], TEAL), ("AERB Radiation Safety", "Radiology Equipment", ["QA survey documentation & validity tracking", "Workload logs & safety interlock testing", "Lead apron & shielding integrity inspections", "Automated alert 60 days before license expiry"], NAVY), ("Data Sovereignty & RBAC", "Enterprise Governance", ["5 discrete user roles with least privilege", "Tamper-evident audit logging with UTC time", "Local on-premise SQLite WAL / PostgreSQL", "Zero external data egress for clinical privacy"], DARK_GRAY) ] card_w = 250 gap = 26 start_x = 60 card_y = 120 card_h = 510 for i, (title, sub, items, color) in enumerate(pillars): cx = start_x + i * (card_w + gap) draw_card(draw, cx, card_y, card_w, card_h, fill=WHITE, border=LIGHT_BORDER, radius=10) draw.rectangle([cx, card_y, cx + card_w, card_y + 12], fill=color) draw.text((cx + 18, card_y + 28), title, fill=color, font=get_font(17, bold=True)) draw.text((cx + 18, card_y + 58), sub, fill=MUTED_GRAY, font=get_font(12, bold=True)) draw.line([cx + 18, card_y + 85, cx + card_w - 18, card_y + 85], fill=LIGHT_BORDER, width=1) iy = card_y + 105 for item in items: draw.ellipse([cx + 18, iy + 4, cx + 26, iy + 12], fill=TEAL) draw.multiline_text((cx + 34, iy), item, fill=DARK_GRAY, font=get_font(12), spacing=4) iy += 90 im.save(os.path.join(OUTPUT_DIR, "blog2_maintenance_compliance_framework.png"), quality=95) print("Created blog2_maintenance_compliance_framework.png") # ========================================== # 5. Blog 3 Hero Image # ========================================== def create_blog3_hero(): w, h = 1200, 630 im = Image.new("RGB", (w, h), NAVY) draw = ImageDraw.Draw(im) # Top brand bar draw.rectangle([0, 0, w, 8], fill=TEAL) # Category Tag draw_card(draw, 60, 40, 360, 36, fill=BLUE, radius=18) draw.text((75, 47), "PREDICTIVE PM & ASSET TRACKING", fill=WHITE, font=get_font(14, bold=True)) # Headline draw.text((60, 95), "Benefits of AI-Powered Preventive", fill=WHITE, font=get_font(40, bold=True)) draw.text((60, 145), "Maintenance & Asset Tracking in Hospitals", fill=TEAL, font=get_font(40, bold=True)) # Subtitle draw.text((60, 205), "MediAsset AI: Every Asset Matters. Every Minute Counts.", fill=PALE_BLUE, font=get_font(17, bold=True)) draw.text((60, 233), "Unifying Biomedical Equipment Records, Breakdown Management, and Predictive Efficiency", fill=LIGHT_BORDER, font=get_font(15)) # Left Container: Equipment Efficiency Scoring draw_card(draw, 60, 280, 525, 305, fill="#163968", border=BLUE, radius=12) draw.text((85, 302), "DETERMINISTIC EFFICIENCY SCORING", fill=WHITE, font=get_font(18, bold=True)) draw.text((85, 328), "Predictive health score computed per medical asset:", fill=LIGHT_BORDER, font=get_font(13)) weights = [ ("Equipment Uptime (50%)", "Ratio of operational hours vs total clinical window", SUCCESS_GREEN), ("PM Adherence (20%)", "Completed on-time vs scheduled preventive runs", TEAL), ("Response Time (15%)", "Mean Time to Acknowledge within SLA target", BLUE), ("Repeat-Free Reliability (15%)", "Zero recurrence of breakdowns within 30 days", WARNING_AMBER) ] wy = 365 for title, desc, color in weights: draw_card(draw, 85, wy, 475, 46, fill=WHITE, border=color, radius=6) draw.rectangle([85, wy, 93, wy + 46], fill=color) draw.text((105, wy + 6), title, fill=NAVY, font=get_font(13, bold=True)) draw.text((105, wy + 25), desc, fill=DARK_GRAY, font=get_font(11)) wy += 53 # Right Container: Asset Tracking & Alert Engine draw_card(draw, 615, 280, 525, 305, fill="#163968", border=TEAL, radius=12) draw.text((640, 302), "PROACTIVE ALERT & TRACKING ENGINE", fill=WHITE, font=get_font(18, bold=True)) draw.text((640, 328), "Real-time automated notifications preventing clinical downtime:", fill=LIGHT_BORDER, font=get_font(13)) alerts = [ ("30/15/7-Day Expiry Radar", "AMC, CMC, and warranty contracts tracked before lapse"), ("Calibration Due Warning", "Ensures zero uncalibrated patient diagnostics in ICU/OT"), ("SLA Breach Countdown", "Real-time escalations to HOD & Medical Director"), ("Demo Equipment Overdue", "Tracks vendor trials to avoid unplanned liabilities") ] ay = 365 for atitle, adesc in alerts: draw_card(draw, 640, ay, 475, 46, fill=WHITE, border=LIGHT_BORDER, radius=6) draw.text((655, ay + 6), atitle, fill=BLUE, font=get_font(13, bold=True)) draw.text((655, ay + 25), adesc, fill=DARK_GRAY, font=get_font(11)) ay += 53 im.save(os.path.join(OUTPUT_DIR, "blog3_preventive_maintenance_tracking_hero.png"), quality=95) print("Created blog3_preventive_maintenance_tracking_hero.png") # ========================================== # 6. Blog 3 TCO / Buy vs Rent Matrix # ========================================== def create_blog3_tco(): w, h = 1200, 675 im = Image.new("RGB", (w, h), CLOUD_WHITE) draw = ImageDraw.Draw(im) # Header draw.rectangle([0, 0, w, 90], fill=NAVY) draw.text((60, 20), "Healthcare Capital Allocation: AI-Driven Buy vs. Rent Analysis", fill=WHITE, font=get_font(28, bold=True)) draw.text((60, 58), "Total Cost of Ownership (TCO) Intelligence for Hospital Management & CFOs", fill=PALE_BLUE, font=get_font(15)) # Formula Box draw_card(draw, 60, 115, 1080, 80, fill=PALE_BLUE, border=BLUE, radius=8) draw.text((85, 128), "TCO Formula: Initial Capital Capex + Cumulative Maintenance (AMC/CMC) + Consumables + Downtime Loss", fill=NAVY, font=get_font(15, bold=True)) draw.text((85, 155), "MediAsset AI computes clinical breakeven thresholds, utilization rates, and optimal replacement timing.", fill=DARK_GRAY, font=get_font(13)) # Decision Matrix (3 Blocks) blocks = [ ("OPTION A: CAPITAL PURCHASE", "Optimal for Core High-Utilization Assets", "1. High patient throughput (> 65% utilization)\n2. Asset life expectancy > 7 years (MRI, CT, Linac)\n3. Predictable maintenance & low obsolescence risk\n4. Lower cumulative cost over 5+ year operational horizon", NAVY), ("OPTION B: EQUIPMENT RENTAL", "Optimal for Seasonal & Trial Deployments", "1. Fluctuating seasonal demand (Ventilators in surges)\n2. Rapidly evolving technology (Specialized Robotics)\n3. Capital conservation for greenfield hospital wings\n4. OEM includes full maintenance and spares in rental", BLUE), ("PREDICTIVE REPLACEMENT MATRIX", "Automated Sunset & Refurbishment Signals", "1. Cumulative repair costs exceed 60% of replacement value\n2. Efficiency score drops below 70% threshold\n3. Recurring breakdowns within 30-day post-service\n4. OEM issues End-of-Life (EOL) notice for spare parts", TEAL) ] col_w = 340 gap = 30 by = 220 bh = 410 for i, (btitle, bsub, bbullets, bcolor) in enumerate(blocks): bx = 60 + i * (col_w + gap) draw_card(draw, bx, by, col_w, bh, fill=WHITE, border=LIGHT_BORDER, radius=10) draw.rectangle([bx, by, bx + col_w, by + 12], fill=bcolor) draw.text((bx + 18, by + 28), btitle, fill=bcolor, font=get_font(15, bold=True)) draw.text((bx + 18, by + 54), bsub, fill=MUTED_GRAY, font=get_font(12, bold=True)) draw.line([bx + 18, by + 80, bx + col_w - 18, by + 80], fill=LIGHT_BORDER, width=1) draw.multiline_text((bx + 18, by + 105), bbullets, fill=DARK_GRAY, font=get_font(13), spacing=14) im.save(os.path.join(OUTPUT_DIR, "blog3_tco_buy_vs_rent_matrix.png"), quality=95) print("Created blog3_tco_buy_vs_rent_matrix.png") if __name__ == "__main__": create_blog1_hero() create_blog1_infographic() create_blog2_hero() create_blog2_compliance() create_blog3_hero() create_blog3_tco() print("All 6 editorial graphics generated successfully!")