---
/** The three steps of every Jimp program, side by side. */
import { Code } from "@astrojs/starlight/components";
const steps = [
{
color: "var(--jp-red)",
title: "Load",
text: "Read a file, URL or buffer.",
code: `import { Jimp } from "jimp";\n\nconst image = await Jimp.read("photo.jpg");`,
},
{
color: "var(--jp-blue)",
title: "Manipulate",
text: "Call methods. Each one edits the image in place.",
code: `image\n .resize({ w: 800 })\n .greyscale();`,
},
{
color: "var(--jp-green)",
title: "Save",
text: "Write a file, or get a buffer or data URL.",
code: `await image.write("photo-small.png");`,
},
];
---
{
steps.map((step, i) => (
{i + 1}
{step.title}
{step.text}
))
}