@@ -6,9 +6,17 @@
#ifndef BIMG_IMAGE_H_HEADER_GUARD
#define BIMG_IMAGE_H_HEADER_GUARD
-#include <bx/pixelformat.h>
-#include <bx/allocator.h>
-#include <bx/readerwriter.h>
+#include <stdint.h> // uint32_t
+#include <stdlib.h> // NULL
+
+namespace bx
+{
+ struct AllocatorI;
+ struct Error;
+ struct ReaderSeekerI;
+ struct WriterI;
+} // namespace bx
namespace bimg
{
@@ -264,29 +272,6 @@ namespace bimg
///
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
- );
-
- , uint32_t _dstBpp
- , uint32_t _srcBpp
- , uint32_t _width
- , uint32_t _height
- , uint32_t _srcPitch
bool imageConvert(
void* _dst
@@ -6,6 +6,8 @@
#ifndef BIMG_DECODE_H_HEADER_GUARD
#define BIMG_DECODE_H_HEADER_GUARD
+#include "bimg.h"
#ifndef BIMG_ENCODE_H_HEADER_GUARD
#define BIMG_ENCODE_H_HEADER_GUARD
@@ -4,6 +4,9 @@
*/
#include <bimg/bimg.h>
+#include <bx/allocator.h>
+#include <bx/readerwriter.h>
+#include <bx/pixelformat.h>
#include <bx/endian.h>
#include <bx/error.h>
#include <bx/simd_t.h>
@@ -43,4 +46,27 @@ namespace bimg
return 1;
}
+ ///
+ void imageConvert(
+ void* _dst
+ , uint32_t _bpp
+ , bx::PackFn _pack
+ , const void* _src
+ , bx::UnpackFn _unpack
+ , uint32_t _size
+ );
+ , uint32_t _dstBpp
+ , uint32_t _srcBpp
+ , uint32_t _width
+ , uint32_t _height
+ , uint32_t _srcPitch
} // namespace bimg
@@ -8,9 +8,8 @@
#include <bx/readerwriter.h>
-#include <bimg/bimg.h>
-#include <bimg/bimg_decode.h>
-#include <bimg/bimg_encode.h>
+#include <bimg/decode.h>
+#include <bimg/encode.h>
#if 0
# define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)