Skip to content

Commit f2a7939

Browse files
committed
docs: minor fixes and refactoring
1 parent b98f640 commit f2a7939

File tree

2 files changed

+39
-34
lines changed

2 files changed

+39
-34
lines changed

β€Žblog/release.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ title: Release Notes
44
date: 2025-07-19
55
---
66

7-
We're excited to announce the release of image-js-typescript, a complete rewrite of the popular image-js library. This new version brings TypeScript support and a more intuitive API while maintaining the powerful image processing capabilities you love.
7+
We're excited to announce the release of a new major version of ImageJS. This version brings TypeScript support and a more intuitive API while maintaining the powerful image processing capabilities you love.
88

9-
<!--- truncate --->
9+
<!-- truncate -->
1010

1111
# API Changes
1212

1313
## ⚠️ Breaking changes
1414

15-
### Changed the way images are loaded and created
15+
### Changes in the way images are loaded and created
1616

17-
Static method `load` for reading and method `save` for writing images have been replaced with dedicated functions `read` and `write`.
17+
Static method `load()` for reading and method `save()` for writing images have been replaced with dedicated functions `read()` and `write()`.
1818

1919
```ts
2020
//Before
@@ -30,7 +30,7 @@ const img2 = await read('cat.jpg');
3030
await write('newCat.jpg', img);
3131
```
3232

33-
There are also synchronous versions of these functions.(add more explanation)
33+
There are also synchronous versions of these functions.
3434

3535
```ts
3636
import { readSync, writeSync } from 'image-js';
@@ -54,9 +54,9 @@ const mask = new Image(10, 10, { kind: 'BINARY' });
5454
const mask = new Mask(10, 10);
5555
```
5656

57-
Dedicated Mask class provides better type safety, clearer API, and optimized performance for binary operations.
57+
Dedicated `Mask` class provides better type safety, clearer API, and optimized performance for binary operations.
5858

59-
The new Mask class uses 1 byte per pixel (vs 8 pixels per byte), trading ~8x memory usage for significantly faster bit operations and simpler data manipulation.
59+
The new `Mask` class uses 1 byte per pixel (vs 8 pixels per byte), trading ~8x memory usage for significantly faster bit operations and simpler data manipulation.
6060

6161
### Modification of Sobel and Scharr filters
6262

@@ -92,31 +92,36 @@ Several methods have been renamed for consistency:
9292

9393
**Drawing methods**:
9494

95-
img.paintPolyline() β†’ img.drawPolyline()
96-
img.paintPolygon() β†’ img.drawPolygon()
97-
img.paintCircle() β†’ img.drawCircle()
95+
`img.paintPolyline()` ➑️ `img.drawPolyline()`
96+
97+
`img.paintPolygon()` ➑️ `img.drawPolygon()`
98+
99+
`img.paintCircle()` ➑️ `img.drawCircle()`
98100

99101
**Other methods**:
100102

101-
img.copy() β†’ img.clone()
102-
img.clearBit() β†’ img.setBit()
103-
img.getLocalMaxima() β†’ img.getExtrema()
104-
img.getChannel() β†’ img.extractChannel()
103+
`img.copy()` ➑️ `img.clone()`
104+
105+
`img.clearBit()` ➑️ `img.setBit()`
106+
107+
`img.getLocalMaxima()` ➑️ `img.getExtrema()`
108+
109+
`img.getChannel()` ➑️ `img.extractChannel()`
105110

106111
Consistent naming follows common conventions (draw\* for rendering, clone for copying objects).
107112

108113
## πŸ†• New Features
109114

110115
### `transform()` function
111116

112-
The `transform` function allows applying transformation matrix on the image. Which means that the image can now be translated or sheared or warped based on the matrix that the user entered. `transform()` function accepts both 2x3 and 3x3 matrices, depending on whether you want an affine transformation or a perspective one.
117+
The `transform()` function allows applying transformation matrix on the image. Which means that the image can now be translated or sheared or warped based on the matrix that the user entered. `transform()` function accepts both 2x3 and 3x3 matrices, depending on whether you want an affine transformation or a perspective one.
113118

114119
```ts
115120
const matrix = getPerspectiveWarp(sourcePoints);
116121
const warped = img.transform(matrix);
117122
```
118123

119-
For more details visit our [tutorial](/docs/Tutorials/Applying transform function on images.md) on how image transformations work.
124+
For more details visit our [tutorial](/docs/Tutorials/Applying%20transform%20function%20on%20images) on how image transformations work.
120125

121126
### Bicubic Interpolation
122127

@@ -130,7 +135,7 @@ const resized = img.resize(800, 600, { interpolation: 'bicubic' });
130135

131136
### Canny Edge Detection
132137

133-
[Canny Edge Detector](https://en.wikipedia.org/wiki/Canny_edge_detector.md) is an advanced edge detection filter for computer vision applications:
138+
[Canny Edge Detector](https://en.wikipedia.org/wiki/Canny_edge_detector) is an advanced edge detection filter for computer vision applications:
134139

135140
```ts
136141
const edges = img.cannyEdgeDetector({
@@ -139,7 +144,7 @@ const edges = img.cannyEdgeDetector({
139144
});
140145
```
141146

142-
**Use case**: Object detection, image segmentation, feature extraction. You can learn more about it [here](../docs/Features/Morphology/Canny Edge Detector.md).
147+
**Use case**: Object detection, image segmentation, feature extraction. You can learn more about it [here](../docs/Features/Morphology/Canny%20Edge%20Detector).
143148

144149
### Prewitt filter
145150

@@ -149,11 +154,11 @@ const edges = img.cannyEdgeDetector({
149154
const prewitt = img.derivative({ filter: 'prewitt' });
150155
```
151156

152-
**Use case**: Object detection, image segmentation, feature extraction. You can learn more about it [here](../docs/Features/Morphology/Morphological Gradient.md).
157+
**Use case**: Object detection, image segmentation, feature extraction. You can learn more about it [here](../docs/Features/Morphology/Morphological%20Gradient).
153158

154159
### Migration from deprecated methods:
155160

156-
`warpingFourPoints` function has been deprecated.Now you have [`getPerspectiveWarp`](../docs/Features/Geometry/Get Perspective Warp Matrix.md) function that returns a matrix that can be applied on an image of interest in a new `transform` function.
161+
`warpingFourPoints()` function has been deprecated. Now you have [`getPerspectiveWarp()`](../docs/Features/Geometry/Get%20Perspective%20Warp%20Matrix) function that returns a matrix that can be applied on an image of interest in a new `transform()` function.
157162

158163
```ts
159164
// Before
@@ -164,37 +169,36 @@ const matrix = getPerspectiveWarp(corners);
164169
const warped = img.transform(matrix);
165170
```
166171

167-
**Use case**: Rectification of a perspective angle of an image. You can learn more about it [here](../docs/Features/Geometry/Get Perspective Warp Matrix.md).
172+
**Use case**: Rectification of a perspective angle of an image. You can learn more about it [here](../docs/Features/Geometry/Get%20Perspective%20Warp%20Matrix).
168173

169-
# πŸ—‘οΈ Removed Features
174+
## πŸ—‘οΈ Removed Features
170175

171176
The following deprecated features have been removed:
172177

173-
- `countAlphaPixel()` - Use custom pixel counting with getPixel()
174-
- `paintLabels()` - Feature was removed due to poor performance.
178+
- `countAlphaPixel()` - Use custom pixel counting with `getPixel()`
179+
- `paintLabels()` - Feature was removed due to dependency issues. We plan to add it back in the future updates.
175180
- `warpingFourPoints()` - Use `getPerspectiveWarp()` + `transform()`.
181+
- 32-bit color depth has been currently deprecated. We plan to add it back in the future updates as well.
176182

177-
# πŸ”§ Compatibility & Requirements
183+
## πŸ”§ Compatibility & Requirements
178184

179185
- Node.js: 18+ (previously 14+)
180186
- TypeScript: 5.2.2+ (if using TypeScript)
181187

182-
# πŸš€ Getting Started
188+
## πŸš€ Getting Started
183189

184-
To get started with ImageJS, we recommend visiting our [\"Get started\"](../docs/Getting started.md) guide
190+
To get started with ImageJS, we recommend visiting our [\"Get started\"](../docs/Getting%20started) guide
185191

186-
# πŸ“š Resources
192+
## πŸ“š Resources
187193

188194
- [API Documentation](https://image-js.github.io/image-js-typescript/)
189195
- [Examples and Tutorials](https://image-js-docs.pages.dev/)
190196
- [GitHub Repository](https://github.com/image-js/image-js-typescript)
191197

192-
# 🀝 Contributing
198+
## 🀝 Contributing
193199

194-
We welcome contributions! The new TypeScript codebase makes it easier than ever to contribute. Check out our contributing guide to get started.
200+
We welcome contributions! The new TypeScript codebase makes it easier than ever to contribute.
195201

196-
# πŸ™ Acknowledgments
202+
## πŸ™ Acknowledgments
197203

198204
Special thanks to all contributors who made this release possible and to the community for their feedback and support during the development process.
199-
200-
Ready to upgrade? Check out our migration guide to get started with image-js-typescript today!

β€Ždocusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ const config = {
9696
showReadingTime: true,
9797
blogTitle: 'Docusaurus blog!',
9898
blogDescription: 'A Docusaurus powered blog!',
99-
postsPerPage: 'ALL',
99+
blogSidebarTitle: 'All posts',
100+
blogSidebarCount: 'ALL',
100101
// Please change this to your repo.
101102
// Remove this to remove the "edit this page" links.
102103
editUrl: 'https://github.com/image-js/image-js-docs/tree/main/',

0 commit comments

Comments
Β (0)