1 #ifndef _SC_META_IMG_H_
2 #define _SC_META_IMG_H_
12 namespace ns_scMetaImg
107 void *
MemCpy__(
void *buf1,
const void *buf2,
int byte_size )
109 unsigned int *buf1_u32;
110 const unsigned int *buf2_u32;
114 buf1_u32 =
static_cast< unsigned int *
>( buf1 );
115 buf2_u32 =
static_cast< const unsigned int *
>( buf2 );
116 dword_size = byte_size / 4;
117 for( i = 0; i < dword_size; i ++ )
119 *buf1_u32 = *buf2_u32;
152 ::operator
delete(
buf1d_ );
255 int Resize(
int width,
int height,
int bit,
int channel )
258 unsigned char *p_addr;
259 int pix_size, plane_size, buf_size;
267 pix_size = width * height;
268 plane_size = pix_size * ( ( bit + 7 ) >> 3 );
269 buf_size = ( plane_size * channel + 3 ) & ‾3;
276 ::operator
delete(
buf1d_ );
283 buf1d_ = ::operator
new( buf_size );
284 buf2d_ = ::new
void*[ channel ];
285 p_addr =
static_cast< unsigned char *
>(
buf1d_ );
286 for( c = 0; c < channel; c ++ )
288 buf2d_[ c ] = p_addr + c * plane_size;
370 return static_cast< unsigned char *
>( 0 );
372 return static_cast< unsigned char *
>(
buf2d_[ index ] );
384 return static_cast< unsigned short *
>(
buf2d_[ index ] );
396 return static_cast< const unsigned char *
>(
buf2d_[ index ] );
408 return static_cast< const unsigned short *
>(
buf2d_[ index ] );
416 return reinterpret_cast< unsigned char **
>(
buf2d_ );
424 return reinterpret_cast< unsigned short **
>(
buf2d_ );
432 return const_cast< const unsigned char **
>(
reinterpret_cast< unsigned char **
>(
buf2d_ ) );
440 return const_cast< const unsigned short **
>(
reinterpret_cast< unsigned short **
>(
buf2d_ ) );
unsigned char Green
パレット情報の緑成分
Definition: scMetaImg.h:35
unsigned char Red
パレット情報の赤成分
Definition: scMetaImg.h:33
unsigned char Reserved
パレット情報の未使用領域
Definition: scMetaImg.h:39
パレットを扱うための構造体
Definition: scMetaImg.h:30
unsigned char Blue
パレット情報の青成分
Definition: scMetaImg.h:37