Skip to content

Commit 6cca264

Browse files
committed
docs: add fixes
1 parent a2cae3a commit 6cca264

File tree

2 files changed

+85
-117
lines changed

2 files changed

+85
-117
lines changed

docs/useful-tips/images/transform-parameters/borderValueTest.svg

Lines changed: 77 additions & 115 deletions
Loading

docs/useful-tips/transform-function-and-its-parameters.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ To understand what `borderType` is, we need to get back to interpolation for a m
9292
```ts
9393
const result = image.transform(matrix, {
9494
borderType: 'constant',
95-
borderValue: 255, // White border
95+
borderValue: 125, // Grey border
9696
});
9797
```
9898

@@ -130,7 +130,7 @@ const result2 = image.transform(rotationMatrix, {
130130
});
131131
```
132132

133-
As you can see using the same matrix images the image seems to be turned into opposite directions. Basically, with `inverse` set to `true` you kind of "revert" an image back to the states that it was before the matrix transformed.
133+
As you can see using the same matrix images the image seems to be turned into opposite directions.
134134

135135
![inverse test](./images/transform-parameters/inverseTest.svg)
136136

@@ -141,6 +141,8 @@ As you can see using the same matrix images the image seems to be turned into op
141141
```ts
142142
//Without fullImage - may crop transformed pixels
143143
const result1 = image.transform(rotationMatrix, {
144+
width: 8,
145+
height: 10,
144146
fullImage: false,
145147
});
146148

@@ -153,3 +155,7 @@ const result2 = image.transform(rotationMatrix, {
153155
This is particularly useful for rotations, where corners of the image may extend beyond the original boundaries.
154156

155157
![fullImage test](./images/transform-parameters/fullImageTest.svg)
158+
159+
:::warning
160+
If `fullImage` is defined together with `width` and `height`, the algorithm will use dimensions calculated for `fullImage`.
161+
:::

0 commit comments

Comments
 (0)