Compare commits
4 Commits
9b21bb837b
...
v2.0.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd82900c7 | |||
| e759efacf6 | |||
| d9a9e3962f | |||
| f976af3833 |
@@ -13,7 +13,7 @@
|
||||
<!-- Nuget Properties. -->
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>ReFuel.StbImage</PackageId>
|
||||
<Version>1.1.0-rc0</Version>
|
||||
<Version>2.0-rc.3</Version>
|
||||
<Authors>STBI Authors, H. Utku Maden</Authors>
|
||||
<Description>
|
||||
A C# wrapper for the ubiquitous stb_image.h and stb_image_write.h library.
|
||||
@@ -21,6 +21,13 @@
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
|
||||
<PackageIcon>images\icon.png</PackageIcon>
|
||||
<PackageProjectUrl>https://refuel.mixedup.dev/docs/ReFuel.StbImage.html</PackageProjectUrl>
|
||||
<RepositoryUrl>https://git.mixedup.dev/ReFuel/ReFuel.StbImage</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>stb; stb_image; stbi; image; load; save; read; write</PackageTags>
|
||||
<PackageReleaseNotes># 2.0.0
|
||||
* Exposed stbi_image_write.h
|
||||
* Moved native function calls to ReFuel.Stb.Native</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace ReFuel.Stb
|
||||
/// <remarks>
|
||||
/// -1 for auto, 0 through 5 to pick a filter. Higher is more. Not thread safe.
|
||||
/// </remarks>
|
||||
public int WriteForcePngFilter
|
||||
public static int WriteForcePngFilter
|
||||
{
|
||||
get => Stbi.write_force_png_filter;
|
||||
set
|
||||
@@ -177,7 +177,7 @@ namespace ReFuel.Stb
|
||||
/// <remarks>
|
||||
/// Higher is more. Defaults to 8. Not thread safe.
|
||||
/// </remarks>
|
||||
public int WritePngCompressionLevel
|
||||
public static int WritePngCompressionLevel
|
||||
{
|
||||
get => Stbi.write_png_compression_level;
|
||||
set => Stbi.write_png_compression_level = value;
|
||||
@@ -189,7 +189,7 @@ namespace ReFuel.Stb
|
||||
/// <remarks>
|
||||
/// Not thread safe.
|
||||
/// </remarks>
|
||||
public bool WriteTgaEnableRLE
|
||||
public static bool WriteTgaEnableRLE
|
||||
{
|
||||
get => Stbi.write_tga_with_rle != 0;
|
||||
set => Stbi.write_tga_with_rle = value ? 1 : 0;
|
||||
|
||||
@@ -98,13 +98,13 @@ namespace ReFuel.Stb
|
||||
/// <summary>
|
||||
/// An easy to use stream wrapper for STBI image write functions.
|
||||
/// </summary>
|
||||
/// <remarks>Keep struct alive for the duration of the write operation.</remarks>
|
||||
public struct StbiWriteStreamWrapper
|
||||
/// <remarks>Keep object alive for the duration of the write operation.</remarks>
|
||||
public class StbiWriteStreamWrapper
|
||||
{
|
||||
private readonly Stream _stream;
|
||||
private readonly StbiWriteProc _cb;
|
||||
|
||||
public IntPtr Callback => Marshal.GetFunctionPointerForDelegate(_cb);
|
||||
public IntPtr Callback { get; }
|
||||
|
||||
public StbiWriteStreamWrapper(Stream stream)
|
||||
{
|
||||
@@ -113,6 +113,7 @@ namespace ReFuel.Stb
|
||||
{
|
||||
_cb = WriteCb;
|
||||
}
|
||||
Callback = Marshal.GetFunctionPointerForDelegate(_cb);
|
||||
}
|
||||
|
||||
private unsafe void WriteCb(void *context, void *data, int size)
|
||||
|
||||
Reference in New Issue
Block a user