You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const pixel =img.getPixel(x, y); // number[] with proper channel count
23
23
```
24
24
25
-
This eliminates runtime type errors and provides better IntelliSense, autocomplete, and refactoring support in your IDE. Developers can now catch bugs at compile time rather than discovering them in production.
25
+
This helps preventing runtime type errors and enables better IntelliSense, autocomplete, and refactoring support in your IDE. Developers can now catch bugs at compile time rather than discovering them in production.
26
26
27
27
## ⚠️ Breaking changes
28
28
29
29
### Images
30
30
31
-
#### Loading and saving
31
+
#### Loading and saving images
32
32
33
33
`load()` and `save()` have been replaced with dedicated functions `read()` and `write()`.
34
34
@@ -56,7 +56,7 @@ writeSync('newCat.jpg', img);
56
56
57
57
Those changes separates I/O operations from image manipulation for a clearer API design.
58
58
59
-
#### Creating
59
+
#### Creating images
60
60
61
61
When creating a new image, unlike before, image's width and height must be specified.
62
62
@@ -71,7 +71,7 @@ const image2 = new Image(10, 10);
71
71
72
72
This change makes the Image constructor more explicit by requiring you to specify the dimensions upfront, preventing potential errors from working with uninitialized or undefined-sized images.
73
73
74
-
#### Coordinate System Changes
74
+
#### Coordinate system changes
75
75
76
76
Coordinates are now represented using `Point` objects instead of arrays. This change affects methods that require coordinate input like cropping, drawing, pixel manipulation etc.
77
77
@@ -118,17 +118,13 @@ ROI map creation methods like `fromMask()` and `fromWatershed()` are now standal
This filter now also accepts only grayscale images, since filters, like Sobel or Scharr, are used mainly on grayscale images to detect edges.
173
169
174
-
### Method Renaming
170
+
### Renamed methods
175
171
176
172
Several methods have been renamed for consistency:
177
173
@@ -293,7 +289,7 @@ The following deprecated features have been removed:
293
289
-`findCorrespondingRoi()` has been removed.
294
290
-`resetPainted()` has been removed.
295
291
-`mergeRoi()` and `mergeRois()` have been removed.
296
-
-`minX`,`minY`,`meanX`,`meanY`,`maxX`,`maxY` have been removed. Use [ROI's `position`, combined with its `width` and `height`](https://image-js.github.io/image-js/classes/index.Roi.html'API link on ROI').
292
+
-`minX`,`minY`,`meanX`,`meanY`,`maxX`,`maxY` have been removed. Use [ROI's `origin`, combined with its `width` and `height`](https://image-js.github.io/image-js/classes/index.Roi.html'API link on ROI').
For more details, visit our [tutorial](/docs/Tutorials/Applying%20transform%20function%20on%20images'internal link on transform function tutorial') on how image transformations work how they can be used.
305
+
For more details, [visit our tutorial](/docs/Tutorials/Applying%20transform%20function%20on%20images'internal link on transform function tutorial') on how image transformations work how they can be used.
**Use cases**: Object detection, image segmentation, feature extraction. You can learn more about it [here](../docs/Features/Morphology/Morphological%20Gradient'internal link on morphological gradient').
325
+
**Use cases**: Object detection, image segmentation, feature extraction. You can [learn more about it here](../docs/Features/Morphology/Morphological%20Gradient'internal link on morphological gradient').
0 commit comments