Compare commits

..

No commits in common. "925464e0c0b2252f6de6584e58646a5b2851ab7f" and "9b21bb837bf0464e2ea65961027787fcdc5e54f2" have entirely different histories.

2 changed files with 6 additions and 14 deletions

@ -13,7 +13,7 @@
<!-- Nuget Properties. -->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>ReFuel.StbImage</PackageId>
<Version>2.0-rc</Version>
<Version>1.1.0-rc0</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,13 +21,6 @@
<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>
<!--

@ -98,13 +98,13 @@ namespace ReFuel.Stb
/// <summary>
/// An easy to use stream wrapper for STBI image write functions.
/// </summary>
/// <remarks>Keep object alive for the duration of the write operation.</remarks>
public class StbiWriteStreamWrapper
/// <remarks>Keep struct alive for the duration of the write operation.</remarks>
public struct StbiWriteStreamWrapper
{
private readonly Stream _stream;
private readonly StbiWriteProc _cb;
public IntPtr Callback { get; };
public IntPtr Callback => Marshal.GetFunctionPointerForDelegate(_cb);
public StbiWriteStreamWrapper(Stream stream)
{
@ -113,7 +113,6 @@ namespace ReFuel.Stb
{
_cb = WriteCb;
}
Callback = Marshal.GetFunctionPointerForDelegate(_cb);
}
private unsafe void WriteCb(void *context, void *data, int size)