-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathchangelog.txt
378 lines (350 loc) · 20.1 KB
/
changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
Legend:
! Breaking change
* Compatible change
- Bugfix
+ New feature
===============================================================================
~~~~~~~~~
! v9.0.0:
~~~~~~~~~
! Assembly changes:
===================
! Dropping support for .NET Core 2.0. Manual compilation for .NET Core 2.0 is still possible but the public NuGet
packages are not going to support this platform anymore. If you target the .NET Core 2.0 platform in your project,
the v9.0.0 version of the NuGet package will pick the .NET Standard 2.0 build instead.
! General changes:
===================
! All methods with a ParallelConfig/AsyncConfig/TaskConfig parameter (breaking only on Windows .NET 5.0 and below):
! When AsyncConfigBase.MaxDegreeOfParallelism is zero or less, then the maximum degree of parallelism was
determined by Environment.ProcessorCount, which doesn't respect the CPU affinity for the current process if the
targeted platform is below .NET 6.0. From now on the CPU affinity is respected on all platform targets.
See also: https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/environment-processorcount-on-windows
! KGySoft.Drawing.Imaging namespace
===================================
! IReadableBitmapData interface: (breaking only if you implement it, which is normally not needed)
! New GetColorIndex/ReadRaw<T> methods
! IWritableBitmapData interface: (breaking only if you implement it, which is normally not needed)
! New SetColorIndex/WriteRaw<T> methods
! BitmapDataFactory class:
! CreateBitmapData overloads with T[], ArraySection<T> or Array2D<T> buffer and KnownPixelFormat parameters:
! The stride must be a multiple of the pixel size of the specified pixel format as well, not just the element
size of the underlying array type. Unmanaged buffers, buffers of T[,], and custom pixel formats are not
affected by this new constraint.
* Self-allocating CreateBitmapData overloads: By default, no longer using array pooling if the natural element
type of the underlying array is other than byte. This can be adjusted by the new PoolingStrategy property.
+ New PoolingStrategy property
- BitmapDataExtensions class:
- Cloning a bitmap with a custom pixel format may have failed if the source bitmap was so huge that the cloned
bitmap could not be created with a byte array buffer. If the bitmap is too big even for an UInt64 array buffer,
then a NotSupportedException is thrown.
+ Palette class:
+ Now every factory method has an overload that allows specifying the alpha threshold, not just the ones that
return a palette with alpha colors.
* PredefinedColorsQuantizer class:
+ New FromCustomPalette overload that allows specifying the palette entries as Color32 values.
* Every method with Color parameter now has an overload with Color32 parameter. The old overloads are now hidden,
though they are still there for binary compatibility.
+ Alpha threshold can be specified for all quantizers, not just for the ones that have alpha colors.
+ New ArrayPoolingStrategy enumeration
+ New KGySoft.Drawing.Shapes namespace
======================================
+ New BitmapDataExtensions class
+ New DrawLine/BeginDrawLine/EndDrawLine/DrawLineAsync methods
+ New DrawLines/BeginDrawLines/EndDrawLines/DrawLinesAsync methods
+ New DrawBeziers/BeginDrawBeziers/EndDrawBeziers/DrawBeziersAsync methods
+ New DrawPolygon/BeginDrawPolygon/EndDrawPolygon/DrawPolygonAsync methods
+ New FillPolygon/BeginFillPolygon/EndFillPolygon/FillPolygonAsync methods
+ New DrawRectangle/BeginDrawRectangle/EndDrawRectangle/DrawRectangleAsync methods
+ New FillRectangle/BeginFillRectangle/EndFillRectangle/FillRectangleAsync methods
+ New DrawEllipse/BeginDrawEllipse/EndDrawEllipse/DrawEllipseAsync methods
+ New FillEllipse/BeginFillEllipse/EndFillEllipse/FillEllipseAsync methods
+ New DrawArc/BeginDrawArc/EndDrawArc/DrawArcAsync methods
+ New DrawPath/BeginDrawPath/EndDrawPath/DrawPathAsync methods
+ New DrawPie/BeginDrawPie/EndDrawPie/DrawPieAsync methods
+ New FillPie/BeginFillPie/EndFillPie/FillPieAsync methods
+ New DrawRoundedRectangle/BeginDrawRoundedRectangle/EndDrawRoundedRectangle/DrawRoundedRectangleAsync methods
+ New FillRoundedRectangle/BeginFillRoundedRectangle/EndFillRoundedRectangle/FillRoundedRectangleAsync methods
+ New FillPath/BeginFillPath/EndFillPath/FillPathAsync methods
+ New Brush class
+ New Pen class
+ New Path class
+ New DrawingOptions class
+ New TransformationMatrix struct
+ New LineCapStyle, LineJoinStyle, PixelOffset, ShapeFillMode, GradientWrapMode, TextureMapMode enumerations
~~~~~~~~~
+ v8.2.0:
~~~~~~~~~
+ KGySoft.Drawing.Imaging namespace
===================================
+ BitmapDataExtensions class:
+ New Clone overloads with ParallelConfig parameter.
+ New CopyTo overloads with ParallelConfig parameter.
+ New DrawInto overloads with ParallelConfig parameter.
+ New Clear overload with ParallelConfig parameter.
+ New Quantize overload with ParallelConfig parameter.
+ New Dither overload with ParallelConfig parameter.
+ New TransformColors overload with ParallelConfig parameter.
~~~~~~~~~
* v8.1.0:
~~~~~~~~~
* KGySoft.Drawing.Imaging namespace
===================================
+ BitmapDataFactory class:
+ New CreateBitmapData overloads.
+ ColorF struct:
+ FromRgb(Vector3), FromRgba(Vector4), ToRgba, ToRgb methods: Now they are available also for .NET Framework 4.5
and .NET Standard 2.0 targets.
+ PColorF struct:
+ FromRgba(Vector4), ToRgba methods: Now they are available also for .NET Framework 4.5 and .NET Standard 2.0
targets.
+ ColorSpaceHelper class:
+ SrgbToLinearVectorRgba and LinearToSrgbVectorRgba methods: Now they are available also for .NET Framework 4.5
and .NET Standard 2.0 targets.
* OptimizedPaletteQuantizer class:
* MedianCut method: Improved memory usage and performance. Supports parallel processing.
* Palette class:
* GetNearestColor and GetNearestColorIndex methods:
* Improving performance
- AlphaThreshold was not considered for partially transparent colors with an exact match in the palette.
- The result was not always correct if the palette contained partially transparent colors.
~~~~~~~~~
! v8.0.0:
~~~~~~~~~
+ Assembly changes:
===================
+ Targeting also .NET 8.0
! KGySoft.Drawing.Imaging namespace
===================================
! BitmapDataFactory class:
! The old CreateBitmapData overloads for custom pixel formats (the ones that have PixelFormatInfo parameter) no
longer assume that the delegates can work independently with any back buffer. To assume this use the new
overloads with Custom[Indexed]BitmapDataConfig parameters and set the BackBufferIndependentPixelAccess property.
+ New CreateBitmapData overloads with Custom[Indexed]BitmapDataConfig parameters for custom pixel format with
delegates for also other color types than Color32. You can use these for wide custom pixel formats.
! BitmapDataExtensions class:
! GetColorCount/BeginGetColorCount/ColorCountAsync methods: For custom pixel formats or when the raw data was not
accessible the counting quantized the possibly wide colors to 32 bit. From now on the real number of colors are
returned even for such cases. Though it counts as a breaking change, this is actually an improvement.
! Clone/BeginClone/CloneAsync methods: When the target pixel format was a different wide format than that of the
source, then the colors were quantized to 32 bit during the operation even without a specified quantizer.
From now on the cloning can preserve the original color depth between different wide formats. Marked as a
breaking change but this is actually an improvement.
! CopyTo/BeginCopyTo/CopyToAsync methods: When the target pixel format was a different wide format than that of
the source, then the colors were quantized to 32 bit during the operation even without a specified quantizer.
From now on the copying can preserve the original color depth between different wide formats. Marked as a
breaking change but this is actually an improvement.
! DrawInto/BeginDrawInto/DrawIntoAsync methods: When the target pixel format was a different wide format than that
of the source, then the colors were quantized to 32 bit during the operation even without a specified quantizer.
From now on the drawing can preserve the original color depth between different wide formats. Marked as a
breaking change but this is actually an improvement.
! PixelFormatInfo struct:
! ToKnownPixelFormat method: It can return the new KnownPixelFormat values.
+ New Prefers64BitColors and Prefers128BitColors properties
- LinearGamma property: setting it to false did not reset the value.
! PredefinedColorsQuantizer class:
! FromBitmapData and FromPalette methods: The PixelFormatHint property of the returned quantizer can return one
of the new pixel formats.
! IWritableBitmapData interface: (breaking only if you implement it, which is normally not needed)
! SetColor32 method: it no longer has default implementation (.NET Core 3.0/.NET Standard 2.1 and above)
! New SetColor64/SetColorF/SetPColor32/SetPColor64/SetPColorF methods
! IReadableBitmapData interface: (breaking only if you implement it, which is normally not needed)
! GetColor32 method: it no longer has default implementation (.NET Core 3.0/.NET Standard 2.1 and above)
! New GetColor64/GetColorF/GetPColor32/GetPColor64/GetPColorF methods
! IWritableBitmapDataRow interface: (breaking only if you implement it, which is normally not needed)
! New SetColor32/SetColor64/SetColorF/SetPColor32/SetPColor64/SetPColorF methods
! IReadableBitmapDataRow interface: (breaking only if you implement it, which is normally not needed)
! New GetColor32/GetColor64/GetColorF/GetPColor32/GetPColor64/GetPColorF methods
+ KnownPixelFormat enum:
+ New Format96bppRgb field
+ New Format128bppRgba field
+ New Format128bppPRgba field
+ New Format8bppGrayScale field
+ New Format32bppGrayScale field
+ New CustomBitmapDataConfig, CustomIndexedBitmapDataConfig types for configuring pixel access of bitmaps with
custom pixel formats.
* ColorExtensions class:
+ New ToColor* overloads between sRGB and linear color formats with adjustColorSpace parameter.
- Fixing Blend(ColorF, ColorF, WorkingColorSpace) method for the sRGB color space.
+ PColor32 struct:
+ New FromArgb overload
+ PColor64 struct:
+ New FromArgb overload
+ ColorF struct:
+ New FromArgb method
+ New FromGray method
+ New ToGray method
+ New ToOpaque method
+ PColorF struct:
+ New FromArgb method
~~~~~~~~~
* v7.2.0:
~~~~~~~~~
* KGySoft.Drawing.Imaging namespace
===================================
+ The Color64 struct has been made public
+ The ColorF struct has been made public
+ New PColor32 struct
+ New PColor64 struct
+ New PColorF struct
+ Color32 struct:
+ New ToArgbUInt32/ToRgbUInt32 methods
+ New FromArgb/FromRgb overload from uint
* ColorExtensions class:
+ New ToColor/ToColor32/ToColor64/ToColorF/ToPColor32/ToPColor64/ToPColorF methods
+ New ToPremultiplied/ToStraight methods
+ New GetBrightness overloads
+ New GetBrightnessF methods
+ New Blend overloads
+ New TolerantEquals overloads
* Improving performance (Blend, GetBrightness and some internal conversion operations)
* ColorSpaceHelper class:
+ Adding new ToFloat overload from UInt16
+ Adding new ToUInt16 methods
+ Adding new SrgbToLinear overload from UInt16
+ Adding new LinearToSrgb16Bit method
+ Adding new ToByte overload from UInt16
- Fixing float-float version of LinearToSrgb for some out-of-bounds values
* Palette class:
* Grayscale256 method: improving grayscale mapping when working in the linear color space
+ Grayscale16/Grayscale4 methods: special linear color space handling even if directMapping is true
+ PredefinedColorsQuantizer class:
+ New FromCustomFunction overload
* BitmapDataFactory class:
* Improving grayscale conversion for the known grayscale pixel format when working in the linear color space
- BitmapDataExtensions class:
- Some Clone overloads did not preserve original back color and alpha threshold.
- PixelFormatInfo struct:
- Setting HasAlpha to false did not reset also the HasPremultipliedAlpha and HasSingleBitAlpha properties, though
setting these properties to true did set also the HasAlpha property.
~~~~~~~~~
! v7.1.0:
~~~~~~~~~
! KGySoft.Drawing.Imaging namespace
===================================
! IBitmapData interface:
! New WorkingColorSpace property. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1
where this property has a default implementation and returns WorkingColorSpace.Default.
! IQuantizingSession interface:
! New WorkingColorSpace property. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard
2.1 where this property has a default implementation and returns WorkingColorSpace.Default.
! Palette class:
! The constructors with Func<Color32, int> parameters are now obsolete. These overloads have no default parameters
anymore so if you didn't use the old customGetNearestColorIndex parameter, then automatically the new overloads
are called if you recompile your code.
+ New constructor overloads with IEnumerable<Color32> parameter instead of an array.
+ New constructor and factory method overloads with workingColorSpace parameters.
+ New WorkingColorSpace property.
- The constructor with Color32[] parameter just used to store the specified array. This made possible to corrupt
the palette if the array elements were changed after creating the palette. From now on the elements are copied
into a new storage.
! RandomNoiseDitherer:
! New constructor overload. Marked as a breaking change because if an integer constant literal was passed to the
strength parameter the compiler may say the call is ambiguous between float and AutoStrengthMode enum.
! InterleavedGradientNoiseDitherer:
! New constructor overload. Marked as a breaking change because if an integer constant literal was passed to the
strength parameter the compiler may say the call is ambiguous between float and AutoStrengthMode enum.
+ New IPalette interface
+ New WorkingColorSpace enumeration
+ New AutoStrengthMode enumeration
+ BitmapDataExtensions class:
+ New Clone/BeginClone/CloneAsync overloads with workingColorSpace parameter.
+ New GetPreferredColorSpace method.
+ BitmapDataFactory class:
+ New CreateBitmapData overloads with workingColorSpace parameter.
+ ColorExtensions class:
+ New Blend overload
+ New ColorSpaceHelper class
+ PredefinedColorsQuantizer class:
+ New WorkingColorSpace property.
+ New ConfigureColorSpace method
+ OptimizedPaletteQuantizer class:
+ New WorkingColorSpace property.
+ New ConfigureColorSpace method
+ PixelFormatInfo struct:
+ New LinearGamma property.
~~~~~~~~~
! v7.0.0:
~~~~~~~~~
NOTE: This is the first version of KGySoft.Drawing.Core but as it was extracted from the KGySoft.Drawing library the
changes are compared to KGySoft.Drawing v6.3.2. Breaking changes can be interpreted as an upgrade from that library.
! Assembly changes:
===================
! System.Drawing.Common package is no longer referenced (.NET Core/Standard 2.0 and above). To use APIs that depend
on System.Drawing.Common (eg. Image, Bitmap, Icon, Metafile, etc.) reference the KGySoft.Drawing package.
! KGySoft.Drawing namespace
===========================
! The IDrawingProgress interface has been removed. It is replaced by KGySoft.Threading.IAsyncProgress from the
KGySoft.CoreLibraries assembly.
! The DrawingProgress struct has been removed. It is replaced by KGySoft.Threading.AsyncProgress<T> from the
KGySoft.CoreLibraries assembly.
! The AsyncConfigBase, AsyncConfig and TaskConfig classes and the IAsyncContext interface have been replaced by the
identically named types from the KGySoft.Threading namespace in the KGySoft.CoreLibraries assembly.
! KGySoft.Drawing.Imaging namespace
===================================
! Every method with a System.Drawing.Imaging.PixelFormat enum parameter have been changed to use the
KGySoft.Drawing.Imaging.KnownPixelFormat enum type instead. The field names of both enums are the same.
! IBitmapData interface:
! The PixelFormat property from now on returns a PixelFormatInfo struct rather than an enum value of the
System.Drawing.Imaging.PixelFormat type. It now supports custom formats better and you still can convert it
to a known format if needed.
! New Size property. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this property has a default implementation using the Width and Height properties.
! IBitmapDataRow interface:
! The MoveNextRow method has been moved to the new IBitmapDataRowMovable interface
! ICustomBitmapDataRow interface
! New Index property
! IReadableBitmapData interface
! FirstRow returns an IReadableBitmapDataRowMovable instead of IReadableBitmapDataRow
! New GetMovableRow method. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this method has a default implementation.
! New GetColor32 method. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this method has a default implementation.
! IWritableBitmapData interface
! FirstRow returns an IWritableBitmapDataRowMovable instead of IWritableBitmapDataRow
! New GetMovableRow method. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this method has a default implementation.
! New SetColor32 method. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this method has a default implementation.
! IReadWriteBitmapData interface
! FirstRow returns an IReadWriteBitmapDataRowMovable instead of IReadWriteBitmapDataRow
! New GetMovableRow method. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this method has a default implementation.
! BitmapDataExtensions class:
! The ToBitmap/BeginToBitmap/EndToBitmap/ToBitmapAsync methods are now in the ReadableBitmapDataExtensions class
of the KGySoft.Drawing package. When recompiling C# sources, this is not a breaking change if you use the
KGySoft.Drawing package and use these methods as extensions (without the class name).
+ New Clone/CopyTo/DrawInto/Clear/TransformColors/Quantize/Dither overloads with IAsyncContext parameter.
+ New Resize/BeginResize/EndResize/ResizeAsync methods
! IQuantizingSession interface:
! New IsGrayscale property. Not a breaking change when targeting at least .NET Core 3.0/.NET Standard 2.1 where
this property returns false if not implemented.
+ ColorExtensions class:
+ New Color32 extension method.
* Blend method: improving performance when blending with opaque background color.
+ New KnownPixelFormat enum. The names of the actual formats are compatible with System.Drawing.Imaging.PixelFormat
but some of them have different underlying values. Use the ToPixelFormat extension from KGySoft.Drawing to convert
it to a System.Drawing.Imaging.PixelFormat.
+ New IBitmapDataRowMovable, IReadableBitmapDataRowMovable, IWritableBitmapDataRowMovable and
IReadWriteBitmapDataRowMovable interfaces
+ New KnownPixelFormatExtensions class
+ Palette class:
+ New public constructor to create a new Palette from an existing one with different back color and alpha
threshold values.
+ The IsGrayscale and HasAlpha properties have been made public.
+ PixelFormatInfo struct:
+ New public constructor from KnownPixelFormat
+ New IsCustomFormat property
+ Implementing IEquatable<PixelFormatInfo>
+ Equality and inequality operators are overloaded
+ New ToKnownPixelFormat method
+ New QuantizerExtensions class to initialize a quantizing session asynchronously (.NET Framework 4.0 and above)
+ New DithererExtensions class to initialize a dithering session asynchronously (.NET Framework 4.0 and above)
+ Color32 struct:
+ Making Color32 serializable
+ New implicit conversions to and from Color.
+ PredefinedColorsQuantizer class:
+ New public BackColor, AlphaThreshold and Palette properties.
+ OptimizedPaletteQuantizer class:
+ New BackColor, AlphaThreshold and MaxColors properties.
NOTE: See the history of older versions at the following link:
https://github.com/koszeggy/KGySoft.Drawing/blob/master/Specific/GdiPlus/KGySoft.Drawing/changelog.txt