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__io__raw_8cpp_source.html below:

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

Go to the documentation of this file.

Go to the SVN repository for this file.

48

istr.read(

reinterpret_cast<char

*

>

(&header), 4);

55

istr.read(

reinterpret_cast<char

*

>

(&width),

sizeof

(

size_t

));

56

istr.read(

reinterpret_cast<char

*

>

(&height),

sizeof

(

size_t

));

57

istr.read(

reinterpret_cast<char

*

>

(&

depth

),

sizeof

(

size_t

));

62  "CImageIORaw::ReadImage(): failed to allocate image"

);

65

istr.read(

reinterpret_cast<char

*

>

(image->

SetData

()),

66

width * height *

depth

);

72  size_t

x,

size_t

y,

size_t

w,

size_t

h)

76

istr.read(

reinterpret_cast<char

*

>

(&header), 4);

83

istr.read(

reinterpret_cast<char

*

>

(&width),

sizeof

(

size_t

));

84

istr.read(

reinterpret_cast<char

*

>

(&height),

sizeof

(

size_t

));

85

istr.read(

reinterpret_cast<char

*

>

(&

depth

),

sizeof

(

size_t

));

91  "CImageIORaw::ReadImage(): failed to allocate image"

);

95  const size_t

input_bpl = width *

depth

;

96  const size_t

output_bpl = w *

depth

;

100

istr.seekg(input_bpl * y + x *

depth

, ios::beg);

101  for

(

size_t i

= 0;

i

< h; ++

i

,

data

+= output_bpl) {

102

istr.read(

reinterpret_cast<char

*

>

(

data

), output_bpl);

103

istr.seekg(input_bpl - output_bpl, ios::cur);

110  size_t

*,

size_t

*,

size_t

*)

113  "CImageIORaw::ReadImageInfo(): RAW format inspection " 122

ostr.write(

reinterpret_cast<const char

*

>

(

sc_Header

), 4);

129

ostr.write(

reinterpret_cast<const char

*

>

(&width),

sizeof

(

size_t

));

130

ostr.write(

reinterpret_cast<const char

*

>

(&height),

sizeof

(

size_t

));

131

ostr.write(

reinterpret_cast<const char

*

>

(&

depth

),

sizeof

(

size_t

));

134

ostr.write(

reinterpret_cast<const char

*

>

(image.

GetData

()),

135

width * height *

depth

);

141  size_t

width,

size_t

height,

145

ostr.write(

reinterpret_cast<const char

*

>

(

sc_Header

), 4);

150

ostr.write(

reinterpret_cast<const char

*

>

(&width),

sizeof

(

size_t

));

151

ostr.write(

reinterpret_cast<const char

*

>

(&height),

sizeof

(

size_t

));

152

ostr.write(

reinterpret_cast<const char

*

>

(&

depth

),

sizeof

(

size_t

));

156  const size_t

output_bpl = width *

depth

;

160  data

+= input_bpl * y;

161  for

(

size_t i

= 0;

i

< height; ++

i

,

data

+= input_bpl) {

162

ostr.write(

reinterpret_cast<const char

*

>

(

data

), output_bpl);

bool ReadImageInfo(CNcbiIstream &istr, size_t *width, size_t *height, size_t *depth)

Read a portion of an image from a stream, returning a pointer to the image.

CImage * ReadImage(CNcbiIstream &istr)

Read an entire image from a stream, returning a pointer to the image.

void WriteImage(const CImage &image, CNcbiOstream &ostr, CImageIO::ECompress compress)

write images to file in HANDLER format

size_t GetDepth(void) const

const unsigned char * GetData(void) const

size_t GetWidth(void) const

size_t GetHeight(void) const

unsigned char * SetData(void)

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

#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.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static const char * sc_Header


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