Compare commits
10 Commits
e7c90af3ed
...
v1.1.0-rc0
| Author | SHA1 | Date | |
|---|---|---|---|
| e0e57b53f4 | |||
| f135a65c96 | |||
| 846e09054d | |||
| 722d38be5c | |||
| 31f5e3938c | |||
| 03ac61a4d2 | |||
| 9dcd5e56fa | |||
| 018f195000 | |||
| 13ea2941da | |||
| 0c46adc68b |
@@ -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:
|
||||
|
||||
@@ -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
50
StbiWrite.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Submodule docker-cross-compiler updated: caafc898f3...5901e3e317
@@ -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
BIN
rf_stbimage.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user