A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/image__util_8cpp_source.html below:

NCBI C++ ToolKit: src/util/image/image_util.cpp Source File

46  float

w_step = (float)(image.

GetWidth

()) / (

float

)(width);

47  float

h_step = (float)(image.

GetHeight

()) / (

float

)(height);

50

<< width <<

"x"

<< height);

53  for

(

size_t i

= 0;

i

< height; ++

i

) {

54  int

i_start = (

int

)h_offs;

55  int

i_end = (

int

)(h_offs + h_step);

58  for

(

size_t

j = 0; j < width; ++j) {

61  int

j_start = (

int

)w_offs;

62  int

j_end = (

int

)(w_offs + w_step);

72

vals[0] = vals[1] = vals[2] = vals[3] = 0;

73  for

(

int

from_i = i_start; from_i < i_end; ++from_i) {

74  for

(

int

from_j = j_start; from_j < j_end; ++from_j) {

76

image(from_i, from_j);

77  for

(

size_t

k = 0; k < image.

GetDepth

(); ++k) {

78

vals[k] += from_pixel[k];

84  for

(

size_t

k = 0; k < new_image->

GetDepth

(); ++k) {

85

to[k] = (

unsigned

char)((vals[k] /

count

) & 0xff);

97  for

(

int

from_i = i_start; from_i < i_end; ++from_i) {

98  for

(

int

from_j = j_start; from_j < j_end; ++from_j) {

100

image(from_i, from_j);

102  size_t

lum = ( 6969 * from_pixel[0] +

103

23434 * from_pixel[1] +

104

2365 * from_pixel[2])/32768;

107  for

(

size_t

k = 0; k < image.

GetDepth

(); ++k) {

108

to[k] = from_pixel[k];

123  for

(

int

from_i = i_start; from_i < i_end; ++from_i) {

124  for

(

int

from_j = j_start; from_j < j_end; ++from_j) {

126

image(from_i, from_j);

128  size_t

lum = ( 6969 * from_pixel[0] +

129

23434 * from_pixel[1] +

130

2365 * from_pixel[2])/32768;

133  for

(

size_t

k = 0; k < image.

GetDepth

(); ++k) {

134

to[k] = from_pixel[k];

161  unsigned char

* start_ptr = image.

SetData

() + scanline_size *

i

;

162  unsigned char

* end_ptr = image.

SetData

() + scanline_size * (

i

+ 1);

167  for

( ; end_ptr > start_ptr; end_ptr -=

depth

, start_ptr +=

depth

) {

169  std::swap

(*(start_ptr + 1), *(end_ptr + 1));

170  std::swap

(*(start_ptr + 2), *(end_ptr + 2));

175  for

( ; end_ptr > start_ptr; end_ptr -=

depth

, start_ptr +=

depth

) {

177  std::swap

(*(start_ptr + 1), *(end_ptr + 1));

178  std::swap

(*(start_ptr + 2), *(end_ptr + 2));

179  std::swap

(*(start_ptr + 3), *(end_ptr + 3));

197  unsigned char

*

buf

=

new unsigned char

[scanline_size];

199  for

( ; end > start; --end, ++start) {

200  unsigned char

* start_ptr = image.

SetData

() + scanline_size * start;

201  unsigned char

* end_ptr = image.

SetData

() + scanline_size * end;

204

memcpy(

buf

, start_ptr, scanline_size);

205

memcpy(start_ptr, end_ptr, scanline_size);

206

memcpy(end_ptr,

buf

, scanline_size);

static void FlipX(CImage &image)

static CImage * Scale(const CImage &image, size_t width, size_t height, EScale scale=eScale_Average)

static void FlipY(CImage &image)

size_t GetDepth(void) const

size_t GetWidth(void) const

const unsigned char * TConstPixel

size_t GetHeight(void) const

unsigned char * SetData(void)

static unsigned char depth[2 *(256+1+29)+1]

void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

TObjectType * Release(void)

Release a reference to the object and return a pointer to the object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

unsigned int

A callback function used to compare two keys in a database.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4