This commit is contained in:
Branimir Karadžić
2017-04-02 20:56:46 -07:00
parent 9ff83a14b2
commit e905648804
5 changed files with 43 additions and 29 deletions

View File

@@ -6,9 +6,17 @@
#ifndef BIMG_IMAGE_H_HEADER_GUARD #ifndef BIMG_IMAGE_H_HEADER_GUARD
#define BIMG_IMAGE_H_HEADER_GUARD #define BIMG_IMAGE_H_HEADER_GUARD
#include <bx/pixelformat.h> #include <stdint.h> // uint32_t
#include <bx/allocator.h> #include <stdlib.h> // NULL
#include <bx/readerwriter.h>
namespace bx
{
struct AllocatorI;
struct Error;
struct ReaderSeekerI;
struct WriterI;
} // namespace bx
namespace bimg namespace bimg
{ {
@@ -264,29 +272,6 @@ namespace bimg
/// ///
bool imageConvert(TextureFormat::Enum _dstFormat, TextureFormat::Enum _srcFormat); bool imageConvert(TextureFormat::Enum _dstFormat, TextureFormat::Enum _srcFormat);
///
void imageConvert(
void* _dst
, uint32_t _bpp
, bx::PackFn _pack
, const void* _src
, bx::UnpackFn _unpack
, uint32_t _size
);
///
void imageConvert(
void* _dst
, uint32_t _dstBpp
, bx::PackFn _pack
, const void* _src
, uint32_t _srcBpp
, bx::UnpackFn _unpack
, uint32_t _width
, uint32_t _height
, uint32_t _srcPitch
);
/// ///
bool imageConvert( bool imageConvert(
void* _dst void* _dst

View File

@@ -6,6 +6,8 @@
#ifndef BIMG_DECODE_H_HEADER_GUARD #ifndef BIMG_DECODE_H_HEADER_GUARD
#define BIMG_DECODE_H_HEADER_GUARD #define BIMG_DECODE_H_HEADER_GUARD
#include "bimg.h"
namespace bimg namespace bimg
{ {
/// ///

View File

@@ -6,6 +6,8 @@
#ifndef BIMG_ENCODE_H_HEADER_GUARD #ifndef BIMG_ENCODE_H_HEADER_GUARD
#define BIMG_ENCODE_H_HEADER_GUARD #define BIMG_ENCODE_H_HEADER_GUARD
#include "bimg.h"
namespace bimg namespace bimg
{ {
/// ///

View File

@@ -4,6 +4,9 @@
*/ */
#include <bimg/bimg.h> #include <bimg/bimg.h>
#include <bx/allocator.h>
#include <bx/readerwriter.h>
#include <bx/pixelformat.h>
#include <bx/endian.h> #include <bx/endian.h>
#include <bx/error.h> #include <bx/error.h>
#include <bx/simd_t.h> #include <bx/simd_t.h>
@@ -43,4 +46,27 @@ namespace bimg
return 1; return 1;
} }
///
void imageConvert(
void* _dst
, uint32_t _bpp
, bx::PackFn _pack
, const void* _src
, bx::UnpackFn _unpack
, uint32_t _size
);
///
void imageConvert(
void* _dst
, uint32_t _dstBpp
, bx::PackFn _pack
, const void* _src
, uint32_t _srcBpp
, bx::UnpackFn _unpack
, uint32_t _width
, uint32_t _height
, uint32_t _srcPitch
);
} // namespace bimg } // namespace bimg

View File

@@ -8,9 +8,8 @@
#include <bx/readerwriter.h> #include <bx/readerwriter.h>
#include <bx/endian.h> #include <bx/endian.h>
#include <bimg/bimg.h> #include <bimg/decode.h>
#include <bimg/bimg_decode.h> #include <bimg/encode.h>
#include <bimg/bimg_encode.h>
#if 0 #if 0
# define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__) # define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)