Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BitPatty authored Oct 26, 2024
1 parent 59d80c8 commit c016c4a
Show file tree
Hide file tree
Showing 73 changed files with 1,038 additions and 785 deletions.
160 changes: 93 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Published under the [MIT License](https://github.com/BitPatty/imgproxy-url-build
- [dpi](#dpi-imgproxy-docs)
- [dpr](#dpr-imgproxy-docs)
- [drawDetections](#drawdetections-imgproxy-docs)
- [duotone](#duotone-imgproxy-docs)
- [enforceThumbnail](#enforcethumbnail-imgproxy-docs)
- [enlarge](#enlarge-imgproxy-docs)
- [expires](#expires-imgproxy-docs)
Expand All @@ -133,6 +134,7 @@ Published under the [MIT License](https://github.com/BitPatty/imgproxy-url-build
- [maxBytes](#maxbytes-imgproxy-docs)
- [minHeight](#minheight-imgproxy-docs)
- [minWidth](#minwidth-imgproxy-docs)
- [monochrome](#monochrome-imgproxy-docs)
- [pad](#pad-imgproxy-docs)
- [page](#page-imgproxy-docs)
- [pixelate](#pixelate-imgproxy-docs)
Expand Down Expand Up @@ -170,9 +172,9 @@ Defines the brightness, contrast, and saturation.

```typescript
pb().adjust({
brightness: 100, // optional
contrast: 0.8, // optional
saturation: 0.9, // optional
brightness: 100, // optional
contrast: 0.8, // optional
saturation: 0.9 // optional
});
```

Expand All @@ -198,7 +200,7 @@ pb().background('ff0000');
pb().background({
r: 255,
g: 0,
b: 0,
b: 0
});
```

Expand Down Expand Up @@ -231,7 +233,7 @@ Detects objects of the provided classes and blurs them.
```typescript
pb().blurDetections({
sigma: 10,
classNames: ['face'],
classNames: ['face']
});
```

Expand All @@ -252,7 +254,7 @@ Adds a cache buster to the imgproxy params.
#### Example

```typescript
pb().cacheBuster('abcdef123');
pb().cacheBuster("abcdef123");
```

### contrast ([imgproxy docs](https://github.com/imgproxy/imgproxy/blob/6f292443eafb2e39f9252175b61faa6b38105a7c/docs/generating_the_url.md#contrast-idcontrast))
Expand All @@ -273,18 +275,16 @@ Crops the image.

```typescript
pb().crop({
width: 100, // optional
height: 50, // optional
gravity: {
// optional
type: GravityType.CENTER, // required
offset: {
// optional
x: 20, // required
y: 20, // required
},
},
});
width: 100, // optional
height: 50, // optional
gravity: { // optional
type: GravityType.CENTER, // required
offset: { // optional
x: 20, // required
y: 20 // required
}
}
})
```

### disableAnimation ([imgproxy docs](https://github.com/imgproxy/imgproxy/blob/cfa4b596d1f31656f9116cc16f2a4ff7d15c2837/docs/generating_the_url.md#disable-animation-iddisable-animation))
Expand Down Expand Up @@ -325,7 +325,21 @@ Detects objects of the provided classes and draws their bounding boxes.

```typescript
pb().drawDetections({
classNames: ['face'],
classNames: ["face"]
});
```

### duotone ([imgproxy docs](https://github.com/imgproxy/imgproxy-docs/blob/7d15484aea6a1fae5f1dfd1806b5551a4774658d/docs/usage/processing.mdx?plain=1#L429))

Converts the image to duotone with specified intensity and colors.

#### Example

```typescript
pb().duotone({
intensity: 1.0, // required
color1: 'ff0000', // required
color2: '00ff00' // required
});
```

Expand Down Expand Up @@ -457,11 +471,11 @@ Places a gradient on the processed image.

```typescript
pb().gradient({
opacity: 1, // required
color: 'ababab', // optional
direction: 'up', // optional
start: 0.0, // optional
stop: 0.7, // optional
opacity: 1, // required
color: 'ababab', // optional
direction: 'up', // optional
start: 0.0, // optional
stop: 0.7 // optional
});
```

Expand Down Expand Up @@ -489,8 +503,8 @@ When `hashsum_type` is not `none`, imgproxy will calculate the hashsum of the so

```typescript
pb().hashsum({
hashsum: 'ABCDEF', // required
type: HashsumType.NONE, // optional
hashsum: 'ABCDEF', // required
type: HashsumType.NONE // optional
});
```

Expand All @@ -502,12 +516,12 @@ Allows redefining JPEG saving options.

```typescript
pb().jpegOptions({
progressive: boolean, // optional
noSubsample: boolean, // optional
trellisQuant: boolean, // optional
overshootDeringing: boolean, // optional
optimizeScans: boolean, // optional
quantizationTable: 7, // optional
progressive: boolean, // optional
noSubsample: boolean, // optional
trellisQuant: boolean, // optional
overshootDeringing: boolean, // optional
optimizeScans: boolean, // optional
quantizationTable: 7 // optional
});
```

Expand Down Expand Up @@ -551,6 +565,19 @@ Defines the minimum width of the resulting image.
pb().minWidth(100);
```

### monochrome ([imgproxy docs](https://github.com/imgproxy/imgproxy-docs/blob/7d15484aea6a1fae5f1dfd1806b5551a4774658d/docs/usage/processing.mdx?plain=1#L415))

Converts the image to monochrome.

#### Example

```typescript
pb().monochrome({
intensity: 0.3, // required
color: 'ff0000' // optional
});
```

### pad ([imgproxy docs](https://github.com/imgproxy/imgproxy/blob/6f292443eafb2e39f9252175b61faa6b38105a7c/docs/generating_the_url.md#padding))

Applies the specified padding to the image.
Expand All @@ -559,10 +586,10 @@ Applies the specified padding to the image.

```typescript
pb().pad({
top: 100, // optional (Note: sets all other sides if not set explicitly)
right: 100, // optional
bottom: 10, // optional
left: 10, // optional
top: 100, // optional (Note: sets all other sides if not set explicitly)
right: 100, // optional
bottom: 10, // optional
left: 10 // optional
});
```

Expand Down Expand Up @@ -594,9 +621,9 @@ Allows redefining PNG saving options.

```typescript
pb().pngOptions({
interlaced: true, // optional
quantize: false, // optional
quantization_colors: 10, // optional
interlaced: true, // optional
quantize: false, // optional
quantization_colors: 10 // optional
});
```

Expand Down Expand Up @@ -640,9 +667,9 @@ Resizes the image.

```typescript
pb().resize({
type: ResizeType.AUTO, // optional
width: 100, // optional
height: 50, // optional
type: ResizeType.AUTO, // optional
width: 100, // optional
height: 50 // optional
});
```

Expand Down Expand Up @@ -749,13 +776,12 @@ Trims the image background.

```typescript
pb().trim({
threshold: 10, // required
color: 'ffffff', // optional
equal: {
// optional
horizontal: true, // optional
vertical: true, // optional
},
threshold: 10, // required
color: 'ffffff', // optional
equal: { // optional
horizontal: true, // optional
vertical: true // optional
}
});
```

Expand All @@ -767,9 +793,9 @@ Allows redefining unsharpening options.

```typescript
pb().unsharpen({
mode: UnsharpeningMode.AUTO, // optional
weight: 11, // optional
dividor: 24, // optional
mode: UnsharpeningMode.AUTO, // optional
weight: 11, // optional
dividor: 24 // optional
});
```

Expand All @@ -795,22 +821,22 @@ pb().videoThumbnailSecond(3);

### videoThumbnailTile ([imgproxy docs](https://github.com/imgproxy/imgproxy-docs/blob/676c6d4b1f5d9fee79abfecf130fc7dda3f9124e/versioned_docs/version-3.24.x/usage/processing.mdx#video-thumbnail-tile-pro-video-thumbnail-tile))

Generates a tiled sprite using hte source video frames
Generates a tiled sprite using the source video frames

#### Example

```typescript
pb().videoThumbnailTile({
step: 1, // required
columns: 1, // required
rows: 1, // required
tileWidth: 50, // required
tileHeight: 50, // required
extendTile: true, // optional
trim: true, // optional
fill: true, // optional
focusX: 10.3, // optional
focusY: 10.3, // optional
step: 1, // required
columns: 1, // required
rows: 1, // required
tileWidth: 50, // required
tileHeight: 50, // required
extendTile: true, // optional
trim: true, // optional
fill: true, // optional
focusX: 10.3, // optional
focusY: 10.3, // optional
});
```

Expand Down Expand Up @@ -856,8 +882,8 @@ Defines the desired width and height of the watermark. imgproxy always uses `fit

```typescript
pb().watermarkSize({
width: 30, // required
height: 30, // required
width: 30, // required
height: 30 // required
});
```

Expand All @@ -868,7 +894,7 @@ Generate an image from the provided text and use it as a watermark.
#### Example

```typescript
pb().watermarkText('my watermark');
pb().watermarkText("my watermark");
```

### watermarkUrl ([imgproxy docs](https://github.com/imgproxy/imgproxy/blob/6f292443eafb2e39f9252175b61faa6b38105a7c/docs/generating_the_url.md#watermark-url-idwatermark-url))
Expand All @@ -889,4 +915,4 @@ Multiply the image dimensions according to the specified factors.

```typescript
pb().zoom(3);
```
```
14 changes: 0 additions & 14 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
--dark-hl-7: #B5CEA8;
--light-hl-8: #0070C1;
--dark-hl-8: #4FC1FF;
--light-hl-9: #000000;
--dark-hl-9: #C8C8C8;
--light-hl-10: #267F99;
--dark-hl-10: #4EC9B0;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -35,8 +31,6 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--code-background: var(--light-code-background);
} }

Expand All @@ -50,8 +44,6 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--code-background: var(--dark-code-background);
} }

Expand All @@ -65,8 +57,6 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--code-background: var(--light-code-background);
}

Expand All @@ -80,8 +70,6 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--code-background: var(--dark-code-background);
}

Expand All @@ -94,6 +82,4 @@
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
.hl-10 { color: var(--hl-10); }
pre, code { background: var(--code-background); }
Loading

0 comments on commit c016c4a

Please sign in to comment.