<commit_before>﻿using System;
using System.Runtime.InteropServices;

using CSGL;

namespace STB.Unmanaged {
    class STB_native {
        const string lib = "stb";

        [DllImport(lib)]
        public static extern IntPtr stbi_load_from_memory(IntPtr buffer, int length,
            ref int x, ref int y,
            ref int comp, int req_comp,
            out IntPtr error);

        [DllImport(lib)]
        public static extern IntPtr stbi_loadf_from_memory(IntPtr buffer, int length,
            ref int x, ref int y,
            ref int comp, int req_comp,
            out IntPtr error);

        [DllImport(lib)]
        public static extern void stbi_hdr_to_ldr_gamma(float gamma);

        [DllImport(lib)]
        public static extern void stbi_hdr_to_ldr_scale(float scale);

        [DllImport(lib)]
        public static extern void stbi_ldr_to_hdr_gamma(float gamma);

        [DllImport(lib)]
        public static extern void stbi_ldr_to_hdr_scale(float scale);

        [DllImport(lib)]
        public static extern bool stbi_is_hdr_from_memory(IntPtr buffer, int length);

        [DllImport(lib)]
        public static extern bool stbi_is_hdr(byte[] fileName);

        [DllImport(lib)]
        public static extern void stbi_image_free(IntPtr image);

        [DllImport(lib)]
        public static extern int stbi_info_from_memory(IntPtr buffer, int len,
            ref int x, ref int y,
            ref int comp,<commit_msg>Changed type of buffer parameter<commit_after>﻿using System;
using System.Runtime.InteropServices;

using CSGL;

namespace STB.Unmanaged {
    class STB_native {
        const string lib = "stb";

        [DllImport(lib)]
        public static extern IntPtr stbi_load_from_memory(byte[] buffer, int length,
            ref int x, ref int y,
            ref int comp, int req_comp,
            out IntPtr error);

        [DllImport(lib)]
        public static extern IntPtr stbi_loadf_from_memory(byte[] buffer, int length,
            ref int x, ref int y,
            ref int comp, int req_comp,
            out IntPtr error);

        [DllImport(lib)]
        public static extern void stbi_hdr_to_ldr_gamma(float gamma);

        [DllImport(lib)]
        public static extern void stbi_hdr_to_ldr_scale(float scale);

        [DllImport(lib)]
        public static extern void stbi_ldr_to_hdr_gamma(float gamma);

        [DllImport(lib)]
        public static extern void stbi_ldr_to_hdr_scale(float scale);

        [DllImport(lib)]
        public static extern bool stbi_is_hdr_from_memory(IntPtr buffer, int length);

        [DllImport(lib)]
        public static extern bool stbi_is_hdr(byte[] fileName);

        [DllImport(lib)]
        public static extern void stbi_image_free(IntPtr image);

        [DllImport(lib)]
        public static extern int stbi_info_from_memory(byte[] buffer, int len,
            ref int x, ref int y,
            ref int comp,
{'fraction_non_alphanumeric': 0.07326258130777132, 'fraction_numerical': 0.0, 'mean_word_length': 2.5078031212484992, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7440237', 'n_tokens_mistral': 885, 'n_tokens_neox': 862, 'n_words': 261}