{
 "schema_version": "1.0",
 "nodes": [
  {
   "id": "pet",
   "type": "input/image",
   "label": "Pet Photo",
   "parameters": {
    "image": "__PET__",
    "required": true
   }
  },
  {
   "id": "style",
   "type": "input/image",
   "label": "Style Painting",
   "parameters": {
    "image": "__STYLE__",
    "required": true
   }
  },
  {
   "id": "name",
   "type": "input/text",
   "label": "Pet Name",
   "parameters": {
    "text": "Cocoa",
    "multiline": false,
    "required": true
   }
  },
  {
   "id": "title",
   "type": "input/text",
   "label": "Noble Title",
   "parameters": {
    "text": "Duke of the Garden",
    "multiline": false,
    "required": true
   }
  },
  {
   "id": "cutout",
   "type": "ai/remove_background",
   "label": "A1 The Pet Alone",
   "parameters": {}
  },
  {
   "id": "portrait",
   "type": "ai/image_transform",
   "label": "A2 Painted as a Noble Portrait",
   "parameters": {
    "prompt": "Paint the animal from the first image as a seventeenth-century oil portrait in the manner of the second image: a dark warm background, light falling from the left, visible brushwork and fine craquelure. Dress the animal as a nobleman, with a white lace collar over a dark velvet doublet, shown from the chest up. Keep the animal itself exactly: the same breed, coat colour and markings, eyes, ears and expression. Use the second image only for its painting style; none of its person. No text, no signature.",
    "aspect_ratio": "3:4"
   }
  },
  {
   "id": "up",
   "type": "ai/upscale",
   "label": "A3 Four Times Larger for Print",
   "parameters": {
    "scale_factor": "4x",
    "upscale_mode": "illustration"
   }
  },
  {
   "id": "plate",
   "type": "text/template",
   "label": "B1 Write the Plaque",
   "parameters": {
    "template": "[name], [title]",
    "placeholders": [
     {
      "name": "name",
      "inputPort": "name"
     },
     {
      "name": "title",
      "inputPort": "title"
     }
    ]
   }
  },
  {
   "id": "print_size",
   "type": "image/resize",
   "label": "C1 30 x 40 cm at 300 dpi",
   "parameters": {
    "unit": "px",
    "width": 3543,
    "height": 4724,
    "mode": "fill"
   }
  },
  {
   "id": "print_plaque",
   "type": "image/text_overlay",
   "label": "C2 Plaque on the Print",
   "parameters": {
    "typography": {
     "schema": "madoo.image-typography/v1",
     "preset": "minimal",
     "font": {
      "schema": "madoo.font-reference/v1",
      "familyGuid": "7479ebcd-027f-b80c-469e-02923b8f0741",
      "versionGuid": "88f8a3c1-ab85-24c5-3eb8-28a1a0db2be1",
      "family": "Playfair Display",
      "variant": "700",
      "weight": 700,
      "style": "normal",
      "fingerprint": "d15499d5cd5aed357f09b38ca2ebaa6fab759426e5ed1680ae7fd0870da75f9f"
     },
     "size": {
      "mode": "relative",
      "value": 3.4,
      "min": 18,
      "max": 160
     },
     "text": {
      "color": "#2B1D0E",
      "opacity": 1,
      "transform": "none",
      "letterSpacing": 0,
      "lineSpacing": 1.1
     },
     "layout": {
      "anchor": "bottom-center",
      "alignment": "center",
      "maxWidthPercent": 80,
      "maxHeightPercent": 30,
      "maxLines": 1,
      "offsetXPercent": 0,
      "offsetYPercent": 0,
      "overflow": "fit",
      "safeArea": {
       "preset": "custom",
       "topPercent": 5,
       "rightPercent": 6,
       "bottomPercent": 5,
       "leftPercent": 6
      }
     },
     "outline": {
      "enabled": false,
      "color": "#000000",
      "width": 1
     },
     "shadow": {
      "enabled": false,
      "color": "#000000",
      "opacity": 0.45,
      "offsetX": 1,
      "offsetY": 2,
      "blur": 4
     },
     "background": {
      "enabled": true,
      "color": "#C9A227",
      "opacity": 0.95,
      "paddingX": 40,
      "paddingY": 14
     }
    }
   }
  },
  {
   "id": "print_cmyk",
   "type": "image/color_profile",
   "label": "C3 CMYK for the Printer",
   "parameters": {
    "targetProfile": "cmyk",
    "renderingIntent": "perceptual"
   }
  },
  {
   "id": "print_file",
   "type": "image/convert",
   "label": "C4 Print JPEG",
   "parameters": {
    "format": "jpeg",
    "quality": 95
   }
  },
  {
   "id": "square",
   "type": "image/resize_for_platform",
   "label": "D1 Square for Social",
   "parameters": {
    "platform": "instagram_square",
    "format": "png",
    "quality": 90
   }
  },
  {
   "id": "square_plaque",
   "type": "image/text_overlay",
   "label": "D2 Plaque on the Post",
   "parameters": {
    "typography": {
     "schema": "madoo.image-typography/v1",
     "preset": "minimal",
     "font": {
      "schema": "madoo.font-reference/v1",
      "familyGuid": "7479ebcd-027f-b80c-469e-02923b8f0741",
      "versionGuid": "88f8a3c1-ab85-24c5-3eb8-28a1a0db2be1",
      "family": "Playfair Display",
      "variant": "700",
      "weight": 700,
      "style": "normal",
      "fingerprint": "d15499d5cd5aed357f09b38ca2ebaa6fab759426e5ed1680ae7fd0870da75f9f"
     },
     "size": {
      "mode": "relative",
      "value": 4.2,
      "min": 18,
      "max": 160
     },
     "text": {
      "color": "#2B1D0E",
      "opacity": 1,
      "transform": "none",
      "letterSpacing": 0,
      "lineSpacing": 1.1
     },
     "layout": {
      "anchor": "bottom-center",
      "alignment": "center",
      "maxWidthPercent": 80,
      "maxHeightPercent": 30,
      "maxLines": 1,
      "offsetXPercent": 0,
      "offsetYPercent": 0,
      "overflow": "fit",
      "safeArea": {
       "preset": "custom",
       "topPercent": 5,
       "rightPercent": 6,
       "bottomPercent": 5,
       "leftPercent": 6
      }
     },
     "outline": {
      "enabled": false,
      "color": "#000000",
      "width": 1
     },
     "shadow": {
      "enabled": false,
      "color": "#000000",
      "opacity": 0.45,
      "offsetX": 1,
      "offsetY": 2,
      "blur": 4
     },
     "background": {
      "enabled": true,
      "color": "#C9A227",
      "opacity": 0.95,
      "paddingX": 40,
      "paddingY": 14
     }
    }
   }
  },
  {
   "id": "frame_gold",
   "type": "image/border",
   "label": "D3 Gilded Frame",
   "parameters": {
    "width": 36,
    "color": "#B8892B"
   }
  },
  {
   "id": "post",
   "type": "image/border",
   "label": "D4 Dark Edge",
   "parameters": {
    "width": 10,
    "color": "#3A2A12"
   }
  },
  {
   "id": "wallpaper",
   "type": "image/resize_for_platform",
   "label": "E1 Phone Wallpaper",
   "parameters": {
    "platform": "instagram_story",
    "format": "jpeg",
    "quality": 90
   }
  },
  {
   "id": "trim",
   "type": "image/auto_crop",
   "label": "E2 Trim the Pet",
   "parameters": {
    "autoDetect": true,
    "tolerance": 10,
    "margin": 30,
    "marginColor": "transparent"
   }
  },
  {
   "id": "small",
   "type": "image/resize",
   "label": "E3 Sticker 800 px",
   "parameters": {
    "unit": "px",
    "width": 800,
    "height": 800,
    "mode": "fit"
   }
  },
  {
   "id": "outline",
   "type": "image/drop_shadow",
   "label": "E4 White Outline",
   "parameters": {
    "offsetX": 0,
    "offsetY": 0,
    "blurRadius": 4,
    "color": "#FFFFFFFF"
   }
  },
  {
   "id": "sticker",
   "type": "image/drop_shadow",
   "label": "E5 Soft Shadow",
   "parameters": {
    "offsetX": 6,
    "offsetY": 8,
    "blurRadius": 12,
    "color": "#00000055"
   }
  },
  {
   "id": "o_portrait",
   "type": "output/image",
   "label": "portrait",
   "parameters": {
    "output_name": "portrait"
   }
  },
  {
   "id": "o_print_file",
   "type": "output/image",
   "label": "print_file",
   "parameters": {
    "output_name": "print_file"
   }
  },
  {
   "id": "o_social_post",
   "type": "output/image",
   "label": "social_post",
   "parameters": {
    "output_name": "social_post"
   }
  },
  {
   "id": "o_phone_wallpaper",
   "type": "output/image",
   "label": "phone_wallpaper",
   "parameters": {
    "output_name": "phone_wallpaper"
   }
  },
  {
   "id": "o_sticker",
   "type": "output/image",
   "label": "sticker",
   "parameters": {
    "output_name": "sticker"
   }
  }
 ],
 "connections": [
  {
   "from_node": "pet",
   "from_output": "image",
   "to_node": "cutout",
   "to_input": "image"
  },
  {
   "from_node": "cutout",
   "from_output": "result",
   "to_node": "portrait",
   "to_input": "images_0"
  },
  {
   "from_node": "style",
   "from_output": "image",
   "to_node": "portrait",
   "to_input": "images_1"
  },
  {
   "from_node": "portrait",
   "from_output": "result",
   "to_node": "up",
   "to_input": "image"
  },
  {
   "from_node": "name",
   "from_output": "text",
   "to_node": "plate",
   "to_input": "name"
  },
  {
   "from_node": "title",
   "from_output": "text",
   "to_node": "plate",
   "to_input": "title"
  },
  {
   "from_node": "up",
   "from_output": "result",
   "to_node": "print_size",
   "to_input": "image"
  },
  {
   "from_node": "print_size",
   "from_output": "result",
   "to_node": "print_plaque",
   "to_input": "image"
  },
  {
   "from_node": "plate",
   "from_output": "result",
   "to_node": "print_plaque",
   "to_input": "text"
  },
  {
   "from_node": "print_plaque",
   "from_output": "result",
   "to_node": "print_cmyk",
   "to_input": "image"
  },
  {
   "from_node": "print_cmyk",
   "from_output": "result",
   "to_node": "print_file",
   "to_input": "image"
  },
  {
   "from_node": "up",
   "from_output": "result",
   "to_node": "square",
   "to_input": "image"
  },
  {
   "from_node": "square",
   "from_output": "result",
   "to_node": "square_plaque",
   "to_input": "image"
  },
  {
   "from_node": "plate",
   "from_output": "result",
   "to_node": "square_plaque",
   "to_input": "text"
  },
  {
   "from_node": "square_plaque",
   "from_output": "result",
   "to_node": "frame_gold",
   "to_input": "image"
  },
  {
   "from_node": "frame_gold",
   "from_output": "result",
   "to_node": "post",
   "to_input": "image"
  },
  {
   "from_node": "up",
   "from_output": "result",
   "to_node": "wallpaper",
   "to_input": "image"
  },
  {
   "from_node": "cutout",
   "from_output": "result",
   "to_node": "trim",
   "to_input": "image"
  },
  {
   "from_node": "trim",
   "from_output": "result",
   "to_node": "small",
   "to_input": "image"
  },
  {
   "from_node": "small",
   "from_output": "result",
   "to_node": "outline",
   "to_input": "image"
  },
  {
   "from_node": "outline",
   "from_output": "result",
   "to_node": "sticker",
   "to_input": "image"
  },
  {
   "from_node": "portrait",
   "from_output": "result",
   "to_node": "o_portrait",
   "to_input": "image"
  },
  {
   "from_node": "print_file",
   "from_output": "result",
   "to_node": "o_print_file",
   "to_input": "image"
  },
  {
   "from_node": "post",
   "from_output": "result",
   "to_node": "o_social_post",
   "to_input": "image"
  },
  {
   "from_node": "wallpaper",
   "from_output": "result",
   "to_node": "o_phone_wallpaper",
   "to_input": "image"
  },
  {
   "from_node": "sticker",
   "from_output": "result",
   "to_node": "o_sticker",
   "to_input": "image"
  }
 ]
}