-
-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d75314
commit 00b9902
Showing
4 changed files
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ module.exports = { | |
".*.js", | ||
"node_modules/", | ||
"dist/", | ||
"**/browser.js", | ||
], | ||
overrides: [ | ||
{ | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,68 @@ | ||
--- | ||
title: Welcome to Starlight | ||
description: Get started building your docs site with Starlight. | ||
title: Jimp | ||
description: JavaScript Image Manipulation Program | ||
template: splash | ||
hero: | ||
tagline: Congrats on setting up a new Starlight project! | ||
tagline: The JavaScript Image Manipulation Program | ||
image: | ||
file: ../../assets/houston.webp | ||
file: ../../assets/image.png | ||
actions: | ||
- text: Getting Started | ||
- text: Read the docs | ||
link: /guides/getting-started/ | ||
icon: right-arrow | ||
variant: primary | ||
- text: Read the Starlight docs | ||
link: https://starlight.astro.build | ||
- text: GitHub | ||
link: https://github.com/jimp-dev/jimp | ||
icon: external | ||
--- | ||
|
||
import { Card, CardGrid } from '@astrojs/starlight/components'; | ||
import { Steps, Card, CardGrid, LinkCard } from '@astrojs/starlight/components'; | ||
|
||
## Next steps | ||
|
||
<CardGrid stagger> | ||
<Card title="Update content" icon="pencil"> | ||
Edit `src/content/docs/index.mdx` to see this page change. | ||
<CardGrid > | ||
<Card title="Image Formats" icon="pencil"> | ||
Supported image formats include PNG, JPEG, BMP, GIF, and TIFF. | ||
</Card> | ||
<Card title="Add new content" icon="add-document"> | ||
Add Markdown or MDX files to `src/content/docs` to create new pages. | ||
<Card title="Image Manipulation" icon="add-document"> | ||
You can resize, crop, apply filters and more. | ||
</Card> | ||
<Card title="Configure your site" icon="setting"> | ||
Edit your `sidebar` and other config in `astro.config.mjs`. | ||
<Card title="Pluggable" icon="setting"> | ||
Create your own plugins to add new image manipulation methods or formats. | ||
</Card> | ||
<Card title="Read the docs" icon="open-book"> | ||
Learn more in [the Starlight Docs](https://starlight.astro.build/). | ||
<Card title="Just JavaScript" icon="open-book"> | ||
Jimp is just JavaScript, so you can use it in anywhere that JavaScript can be used. | ||
</Card> | ||
</CardGrid> | ||
|
||
## Usage | ||
|
||
Using Jimp is simple. | ||
Load an image, manipulate it, and save it. | ||
|
||
<Steps> | ||
|
||
1. Load an image. | ||
|
||
```ts | ||
import Jimp from "jimp"; | ||
|
||
const image = await Jimp.read("test/image.png"); | ||
``` | ||
|
||
2. Manipulate the image. | ||
|
||
```ts | ||
image.resize({ width: 100 }); | ||
``` | ||
|
||
3. Save the image. | ||
|
||
```ts | ||
await image.write("test/output.png"); | ||
``` | ||
|
||
</Steps> | ||
|
||
<CardGrid> | ||
<LinkCard title="Getting Started" href="/guides/getting-started/" /> | ||
<LinkCard title="API Reference" href="/api/jimp/classes/jimp/" /> | ||
</CardGrid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters