NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Image.cpp File Reference
#include "gui/Image.hpp"
#include "gpu/CudaModule.hpp"
#include "io/File.hpp"
#include "io/ImageBinaryIO.hpp"
#include "io/ImageLodePngIO.hpp"
#include "io/ImageRawPngIO.hpp"
#include "io/ImageTargaIO.hpp"
#include "io/ImageTiffIO.hpp"
#include "io/ImageBmpIO.hpp"

Go to the source code of this file.

Macros

#define C8(TYPE, OFS)   { ChannelType_ ## TYPE, ChannelFormat_Clamp, OFS, 1, 0, 8 }
 
#define C16(TYPE, OFS, SIZE)   { ChannelType_ ## TYPE, ChannelFormat_Clamp, 0, 2, OFS, SIZE }
 
#define C32(TYPE, OFS)   { ChannelType_ ## TYPE, ChannelFormat_Clamp, 0, 4, OFS, 8 }
 
#define CF32(TYPE, OFS)   { ChannelType_ ## TYPE, ChannelFormat_Float, OFS, 4, 0, 32 }
 
#define RGB_565_TO_ABGR_8888(V)   ((V >> 8) & 0x000000F8) | (V >> 13) | ((V << 5) & 0x0000FC00) | ((V >> 1) & 0x00000300) | ((V << 19) & 0x00F80000) | ((V >> 14) & 0x00070000) | 0xFF000000
 
#define ABGR_8888_TO_RGB_565(V)   (U16)(((V << 8) & 0xF800) | ((V >> 5) & 0x07E0) | ((V >> 19) & 0x001F))
 
#define RGBA_5551_TO_ABGR_8888(V)   ((V >> 8) & 0x000000F8) | (V >> 13) | ((V << 5) & 0x0000F800) | (V & 0x00000700) | ((V << 18) & 0x00F80000) | ((V >> 13) & 0x00070000) | ((S32)(V << 31) >> 7)
 
#define ABGR_8888_TO_RGBA_5551(V)   (U16)(((V << 8) & 0xF800) | ((V >> 5) & 0x07C0) | ((V >> 18) & 0x003E) | (V >> 31))
 
#define STREAM(CALL)   { File file(fileName, File::Read); BufferedInputStream stream(file); return CALL; }
 
#define STREAM(CALL)   { File file(fileName, File::Create); BufferedOutputStream stream(file); CALL; stream.flush(); return; }
 

Macro Definition Documentation

#define ABGR_8888_TO_RGB_565 (   V)    (U16)(((V << 8) & 0xF800) | ((V >> 5) & 0x07E0) | ((V >> 19) & 0x001F))

Definition at line 71 of file Image.cpp.

#define ABGR_8888_TO_RGBA_5551 (   V)    (U16)(((V << 8) & 0xF800) | ((V >> 5) & 0x07C0) | ((V >> 18) & 0x003E) | (V >> 31))

Definition at line 74 of file Image.cpp.

#define C16 (   TYPE,
  OFS,
  SIZE 
)    { ChannelType_ ## TYPE, ChannelFormat_Clamp, 0, 2, OFS, SIZE }

Definition at line 43 of file Image.cpp.

#define C32 (   TYPE,
  OFS 
)    { ChannelType_ ## TYPE, ChannelFormat_Clamp, 0, 4, OFS, 8 }

Definition at line 44 of file Image.cpp.

#define C8 (   TYPE,
  OFS 
)    { ChannelType_ ## TYPE, ChannelFormat_Clamp, OFS, 1, 0, 8 }

Definition at line 42 of file Image.cpp.

#define CF32 (   TYPE,
  OFS 
)    { ChannelType_ ## TYPE, ChannelFormat_Float, OFS, 4, 0, 32 }

Definition at line 45 of file Image.cpp.

#define RGB_565_TO_ABGR_8888 (   V)    ((V >> 8) & 0x000000F8) | (V >> 13) | ((V << 5) & 0x0000FC00) | ((V >> 1) & 0x00000300) | ((V << 19) & 0x00F80000) | ((V >> 14) & 0x00070000) | 0xFF000000

Definition at line 70 of file Image.cpp.

#define RGBA_5551_TO_ABGR_8888 (   V)    ((V >> 8) & 0x000000F8) | (V >> 13) | ((V << 5) & 0x0000F800) | (V & 0x00000700) | ((V << 18) & 0x00F80000) | ((V >> 13) & 0x00070000) | ((S32)(V << 31) >> 7)

Definition at line 73 of file Image.cpp.

#define STREAM (   CALL)    { File file(fileName, File::Read); BufferedInputStream stream(file); return CALL; }
#define STREAM (   CALL)    { File file(fileName, File::Create); BufferedOutputStream stream(file); CALL; stream.flush(); return; }