Skip to content

Commit

Permalink
Add missing enums values and update changelog (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaderks authored Dec 5, 2021
1 parent 478c152 commit b24d123
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 5 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.2 - 2021-12-5]

### Added

- Support for .NET 6.0.

### Changed

- Updated source code to leverage C# 10 features.
- Added missing JpegLSError enumerations.
- CharLS Windows DLLs updated to v2.2.1+bea1c0.

## [1.1.0 - 2021-5-8]

### Added
Expand Down
1 change: 1 addition & 0 deletions CharLSNativeDotNet.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=jpegls/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=libcharls/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Lossless/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=MAXVAL/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=RGBRGBRGB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=RRRGGGBBB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=suppressions/@EntryIndexedValue">True</s:Boolean>
Expand Down
4 changes: 3 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

| Version | Supported |
| ------- | ------------------ |
| 1.1.0 | :white_check_mark: |
| 1.2.0 | :white_check_mark: |
| 1.1.0 | :x: |
| 1.0.0 | :x: |

## Reporting a Vulnerability

Expand Down
17 changes: 16 additions & 1 deletion src/JpegLSError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public enum JpegLSError
/// </summary>
InvalidArgumentColorTransformation = 111,

/// <summary>
/// The stride argument does not match with the frame info and buffer size.
/// </summary>
InvalidArgumentStride = 112,

/// <summary>
/// This error is returned when the width parameter is defined more then once in an incompatible way.
/// </summary>
Expand All @@ -202,5 +207,15 @@ public enum JpegLSError
/// <summary>
/// This error is returned when the stream contains an interleave mode (ILV) parameter outside the range [0, 2]
/// </summary>
InvalidParameterInterleaveMode = 204
InvalidParameterInterleaveMode = 204,

/// <summary>
/// This error is returned when the stream contains a near-lossless (NEAR) parameter outside the range [0, min(255, MAXVAL/2)]
/// </summary>
InvalidParameterNearLossless = 205,

/// <summary>
/// This error is returned when the stream contains an invalid JPEG-LS preset coding parameters segment.
/// </summary>
InvalidParameterJpeglsPresetCodingParameters = 206
}
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ dotnet add package CharLS.Native

### Windows specific installation steps

The NuGet package comes with prebuild CharLS DLLs for the x86 and X64 targets.
The Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 (v14.28 or newer) needs to be installed on the target system.
The NuGet package comes with prebuild CharLS DLLs for x86 and X64 targets.
The Microsoft Visual C++ Redistributable for Visual Studio 2015-2022 (v14.30 or newer) needs to be installed on the target system.

### Linux specific installation steps

Expand Down
3 changes: 3 additions & 0 deletions src/SafeNativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ internal static void HandleJpegLSError(JpegLSError error)
case JpegLSError.InvalidParameterComponentCount:
case JpegLSError.InvalidParameterBitsPerSample:
case JpegLSError.InvalidParameterInterleaveMode:
case JpegLSError.InvalidParameterNearLossless:
case JpegLSError.InvalidParameterJpeglsPresetCodingParameters:
case JpegLSError.UnexpectedFailure:
case JpegLSError.NotEnoughMemory:
exception = new InvalidDataException(GetErrorMessage(error));
Expand All @@ -154,6 +156,7 @@ internal static void HandleJpegLSError(JpegLSError error)
case JpegLSError.InvalidArgumentPresetCodingParameters:
case JpegLSError.InvalidArgumentSpiffEntrySize:
case JpegLSError.InvalidArgumentColorTransformation:
case JpegLSError.InvalidArgumentStride:
exception = new ArgumentOutOfRangeException(GetErrorMessage(error));
break;

Expand Down
3 changes: 2 additions & 1 deletion src/nuget-release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1.2.0
- Added support for .NET 6.0
- Latest version of CharLS Windows DLLs v2.2.1 (bea1c0).

1.1.0.
- Added support for Linux and macOS
- Latest version of CharLS Windows DLLs (42c3a58).
- Latest version of CharLS Windows DLLs v2.2.1 (42c3a58).

0 comments on commit b24d123

Please sign in to comment.