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
> **Environment & Setup**: Measured on an Intel Core i7 with Windows 11. `FastImage`resizes 1080p full HD uncompressed image buffers to 720p at **19.5+ full operations per second** with **zero JVM Garbage Collection allocations**.
130
+
> **Environment & Setup**: Measured on an 11th Gen Intel Core i5-1135G7 (Microsoft Surface Pro 8) running Windows 11 with JDK 21. `FastImage`processes full 1080p uncompressed frames at up to **640+ operations per second** (Point) and **199+ operations per second** (OpenMP-accelerated Area-Average Anti-Aliasing) with **zero JVM Garbage Collection allocations**.
128
131
129
132
---
130
133
131
134
## API Quick Reference
132
135
136
+
### Factory & Memory Wrapping
133
137
| Method | Description | Path |
134
138
|--------|-------------|------|
135
-
|`create(width, height)`| Creates an off-heap `FastImage` instance. |[Reference 📖](docs/REFERENCE.md#create)|
publicFastImage resizeNearest(int newWidth, int newHeight)
56
+
```
57
+
Ultra-fast Nearest-Neighbor (point sampling) scaling kernel. Ideal for pixel art, retro rendering, or maximum framerate downsampling.
58
+
59
+
---
60
+
53
61
### `resizeAreaAverage`
54
62
```java
55
63
publicFastImage resizeAreaAverage(int targetWidth, int targetHeight)
56
64
```
57
-
High-quality Anti-Aliasing downsampler using SIMD box area averaging. Eliminates jagged edges and moiré patterns when scaling down desktop or camera feeds.
65
+
High-quality Anti-Aliasing downsampler using OpenMP multi-threaded box area averaging. Eliminates jagged edges and moiré patterns when scaling down desktop or camera feeds.
66
+
67
+
---
68
+
69
+
### `crop`
70
+
```java
71
+
publicFastImage crop(int x, int y, int width, int height)
72
+
```
73
+
Extracts a sub-region into a new `FastImage` instance.
74
+
75
+
---
76
+
77
+
### `flipHorizontal` / `flipVertical`
78
+
```java
79
+
publicFastImage flipHorizontal()
80
+
publicFastImage flipVertical()
81
+
```
82
+
Flips the image buffer along the horizontal or vertical axis in-place.
58
83
59
84
---
60
85
61
86
### `blurKawase`
62
87
```java
63
88
publicFastImage blurKawase(float radius, int passes)
64
89
```
65
-
Applies high-speed Dual-Kawase blur filtering (ideal for UI translucent overlays).
90
+
Applies multi-pass Kawase blur filtering (ideal for UI translucent overlays).
91
+
92
+
---
93
+
94
+
### `blurDualKawase`
95
+
```java
96
+
publicFastImage blurDualKawase(float radius)
97
+
```
98
+
Applies high-speed 2-pass Dual-Kawase downsampling and upsampling blur.
99
+
100
+
---
101
+
102
+
### `blurGaussian`
103
+
```java
104
+
publicFastImage blurGaussian(float radius)
105
+
```
106
+
Applies smooth separable Gaussian blur kernel.
107
+
108
+
---
109
+
110
+
### `blurStack`
111
+
```java
112
+
publicFastImage blurStack(float radius)
113
+
```
114
+
Applies CSS `backdrop-filter` grade fast stack blur.
115
+
116
+
---
117
+
118
+
### `blurBox`
119
+
```java
120
+
publicFastImage blurBox(float radius)
121
+
```
122
+
Applies fast box blur.
123
+
124
+
---
125
+
126
+
### `blurMipmapped`
127
+
```java
128
+
publicFastImage blurMipmapped(float radius)
129
+
```
130
+
Applies hierarchical down/upsample blur for very large radii (100+ pixels).
66
131
67
132
---
68
133
@@ -74,10 +139,50 @@ Converts color image pixels to grayscale using AVX2 SIMD luminance weighting.
74
139
75
140
---
76
141
77
-
## 3. Export API
142
+
### `adjustBrightness`
143
+
```java
144
+
publicFastImage adjustBrightness(float factor)
145
+
```
146
+
Scales luminance of all pixels (`1.0` = original brightness).
147
+
148
+
---
149
+
150
+
### `adjustContrast`
151
+
```java
152
+
publicFastImage adjustContrast(float factor)
153
+
```
154
+
Adjusts image contrast ratio centered around mid-gray (`128`).
155
+
156
+
---
157
+
158
+
## 3. Export & Interop API
78
159
79
160
### `toBufferedImage`
80
161
```java
81
162
publicBufferedImage toBufferedImage()
82
163
```
83
164
Creates a standard Java `BufferedImage` representation from the native pixel memory.
165
+
166
+
---
167
+
168
+
### `getPixels`
169
+
```java
170
+
publicvoid getPixels(int[] destinationBuffer)
171
+
```
172
+
Direct zero-allocation copy into a caller-supplied pre-allocated `int[]` array.
173
+
174
+
---
175
+
176
+
### `getDirectBuffer`
177
+
```java
178
+
publicByteBuffer getDirectBuffer()
179
+
```
180
+
Exposes the native memory address as a direct `java.nio.ByteBuffer` with zero copies.
181
+
182
+
---
183
+
184
+
### `getPointer`
185
+
```java
186
+
publicPointer getPointer()
187
+
```
188
+
Returns a `fastpointer.Pointer` wrapper around the native physical memory address.
0 commit comments