Mal-Voreinstellungen — Stapel aus der Filter-Galerie
Vier Looks aus gestapelten Effekten der PhotoCraft-Filter-Galerie, so geschichtet wie in Photoshops Filtergalerie — Öl auf Leinwand, Aquarell, Pastellskizze und ein alter Meister mit Craquelé. Jede Voreinstellung ist eine einfache Liste von Effekten mit Parametern, die sich ins eigene Skript übernehmen lässt.
INPUT
OUTPUT
JavaScript
// Painting presets — PhotoCraft Filter Gallery stacks, four looks in a 2×2 grid
// demo_photocraft_painting.js
//!INPUT: INPUT
//!OUTPUT: OUTPUT
//!PARAM: TILE:integer=480,min=128,max=1024
//!PARAM: LABELS:boolean=true
// Photoshop's Filter Gallery stacks effects: each one works on the result of the one
// before (bottom to top in the dialog). img.gallery([...]) takes the same list —
// a name for defaults, or { filter, ...params } to tune it.
//
// The four presets below are starting points; copy one into your own script and
// adjust. Engine.filters("gallery") lists every effect with its parameter ranges.
const PRESETS = [
{
label: "Oil on canvas",
stack: [
{ filter: "underpainting", brushSize: 8, textureCoverage: 12, relief: 2 },
{ filter: "dryBrush", brushSize: 3, brushDetail: 9, texture: 1 },
{ filter: "texturizer", texture: "canvas", scaling: 120, relief: 5 },
],
},
{
label: "Watercolour",
stack: [
{ filter: "watercolor", brushDetail: 12, shadowIntensity: 0, texture: 1 },
{ filter: "texturizer", texture: "sandstone", scaling: 80, relief: 3 },
],
},
{
label: "Pastel sketch",
stack: [
{ filter: "roughPastels", strokeLength: 8, strokeDetail: 6, texture: "canvas", relief: 12 },
{ filter: "angledStrokes", strokeLength: 10, sharpness: 2 },
],
},
{
label: "Old master",
stack: [
{ filter: "paletteKnife", strokeSize: 12, strokeDetail: 3, softness: 3 },
{ filter: "craquelure", crackSpacing: 30, crackDepth: 3, crackBrightness: 8 },
],
},
];
// ── Source: square centre crop, TILE×TILE ──────────────────────────────────
const T = Math.round(TILE);
const src = Engine.loadImage(INPUT);
const k = T / Math.min(src.width, src.height);
src.resize(Math.max(T, Math.round(src.width * k)), Math.max(T, Math.round(src.height * k)));
src.crop(Math.floor((src.width - T) / 2), Math.floor((src.height - T) / 2), T, T);
const tiles = PRESETS.map(p => {
const t = src.clone().gallery(p.stack);
if (LABELS) {
const size = Math.max(12, Math.round(T / 22));
t.drawText(p.label, T / 2, T - size, {
font: "Inter", size, anchor: "middle", color: new Pixel(1, 1, 1, 0.9),
});
}
return t;
});
tiles[0].montageH(tiles[1])
.montageV(tiles[2].montageH(tiles[3]))
.save(OUTPUT);