10 Commits

Author SHA1 Message Date
e0e57b53f4 Increment version counter.
All checks were successful
Build / build (push) Successful in 1m36s
2024-06-16 21:36:11 +03:00
f135a65c96 Add stb_image_write.h support. 2024-06-16 21:34:59 +03:00
846e09054d Pull changes in build_native.sh
All checks were successful
Build / build (push) Successful in 2m0s
2024-06-14 22:11:33 +03:00
722d38be5c Update docker cmakes.
All checks were successful
Build / build (push) Successful in 1m23s
2024-06-14 22:00:20 +03:00
31f5e3938c Increment version.
All checks were successful
Build / build (push) Successful in 1m24s
2024-06-14 21:53:08 +03:00
03ac61a4d2 Fix typo in publish.sh.
All checks were successful
Build / build (push) Successful in 1m18s
2024-06-14 18:51:16 +03:00
9dcd5e56fa Rename API key.
Some checks failed
Build / build (push) Failing after 1m17s
2024-06-14 18:48:41 +03:00
018f195000 Make ci run on push to tag.
Some checks failed
Build / build (push) Failing after 1m20s
2024-06-14 18:44:56 +03:00
13ea2941da fix typo in build script. 2024-06-14 18:43:14 +03:00
0c46adc68b Finish rebranding. 2024-06-14 18:40:36 +03:00
6 changed files with 60 additions and 8 deletions

View File

@@ -2,8 +2,9 @@ name: Build
run-name: Building with docker container.
on:
workflow_dispatch:
push:
tags:
- *
- '*'
jobs:
build:
@@ -11,7 +12,7 @@ jobs:
container:
image: git.mixedup.dev/refuel/docker-cross-compiler
env:
QUIK_API_KEY: "${{secrets.REFUEL_API_KEY}}"
REFUEL_API_KEY: "${{secrets.REFUEL_API_KEY}}"
NUGET_USER_NAME: "${{vars.NUGET_USER_NAME}}"
NUGET_INDEX: "${{vars.NUGET_INDEX}}"
volumes:

View File

@@ -13,12 +13,13 @@
<!-- Nuget Properties. -->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>ReFuel.StbImage</PackageId>
<Version>1.1.3</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.
</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIcon>images\icon.png</PackageIcon>
</PropertyGroup>
@@ -29,8 +30,8 @@
that determines a lot of load paths for projects.
-->
<ItemGroup>
<Content Include="README.md" Pack="true" PackagePath="/"/>
<None Include="Quik.Common/assets/quik_ico_256.png" Pack="true" PackagePath="images\icon.png"/>
<Content Include="*.md" Pack="true" PackagePath="/"/>
<None Include="rf_stbimage.png" Pack="true" PackagePath="images\icon.png"/>
<Content Include="runtimes/linux-arm/native/*.so">
<PackagePath>runtimes/linux-arm/native/</PackagePath>
<Pack>true</Pack>

50
StbiWrite.cs Normal file
View File

@@ -0,0 +1,50 @@
using System;
using System.Runtime.InteropServices;
namespace ReFuel.Stb
{
public unsafe delegate void StbiWriteProc(void* context, void* data, int size);
public unsafe partial class Stbi
{
private static readonly int* _tga_with_rle_ptr;
private static readonly int* _png_compression_level_ptr;
private static readonly int* _forced_png_filter_ptr;
public static int write_tga_with_rle
{
get => *_tga_with_rle_ptr;
set => *_tga_with_rle_ptr = value;
}
public static int write_png_compression_level
{
get => *_png_compression_level_ptr;
set => *_png_compression_level_ptr = value;
}
public static int write_force_png_filter
{
get => *_forced_png_filter_ptr;
set => *_forced_png_filter_ptr = value;
}
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_write_png_to_func")]
public static extern int write_png_to_func(IntPtr func, void* context, int w, int h, int comp, void* data, int stride_in_bytes);
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_write_bmp_to_func")]
public static extern int write_bmp_to_func(IntPtr func, void* context, int w, int h, int comp, void* data);
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_write_tga_to_func")]
public static extern int write_tga_to_func(IntPtr func, void* context, int w, int h, int comp, void* data);
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_write_hdr_to_func")]
public static extern int write_hdr_to_func(IntPtr func, void* context, int w, int h, int comp, void* data);
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_write_jpg_to_func")]
public static extern int write_jpg_to_func(IntPtr func, void* context, int w, int h, int comp, void* data, int quality);
[DllImport("stbi", CallingConvention = CallingConvention.Cdecl, EntryPoint = "stbi_flip_vertically_on_write")]
public static extern int flip_vertically_on_write(int value);
}
}

View File

@@ -24,4 +24,4 @@ dotnet nuget add source \
-n ReFuel -u "$NUGET_USER_NAME" -p "$REFUEL_API_KEY" \
--store-password-in-clear-text \
"$NUGET_INDEX"
dotnet nuget push -s ReFeul bin/*/*.nupkg
dotnet nuget push -s ReFuel bin/*/*.nupkg

BIN
rf_stbimage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB