OpenJPH
Open-source implementation of JPEG2000 Part-15
ojph::ppm_out Class Reference

#include <ojph_img_io.h>

Inheritance diagram for ojph::ppm_out:
ojph::image_out_base

Public Member Functions

 ppm_out ()
 
virtual ~ppm_out ()
 
void open (char *filename)
 
void configure (ui32 width, ui32 height, ui32 num_components, ui32 bit_depth)
 
virtual ui32 write (const line_buf *line, ui32 comp_num)
 
virtual void close ()
 
- Public Member Functions inherited from ojph::image_out_base
virtual ~image_out_base ()
 
virtual ui32 write (const line_buf *line, ui32 comp_num)=0
 
virtual void close ()
 

Private Attributes

FILE * fh
 
const char * fname
 
ui32 width
 
ui32 height
 
ui32 num_components
 
ui32 bit_depth
 
ui32 bytes_per_sample
 
ui8buffer
 
ui32 buffer_size
 
ui32 cur_line
 
ui32 samples_per_line
 
ui32 bytes_per_line
 
conversion_fun converter
 
const line_buflptr [3]
 

Detailed Description

Definition at line 528 of file ojph_img_io.h.

Constructor & Destructor Documentation

◆ ppm_out()

ojph::ppm_out::ppm_out ( )
inline

◆ ~ppm_out()

virtual ojph::ppm_out::~ppm_out ( )
inlinevirtual

Definition at line 543 of file ojph_img_io.h.

References buffer, and close().

Member Function Documentation

◆ close()

virtual void ojph::ppm_out::close ( )
inlinevirtual

Reimplemented from ojph::image_out_base.

Definition at line 554 of file ojph_img_io.h.

References fh, and fname.

Referenced by ~ppm_out().

◆ configure()

◆ open()

void ojph::ppm_out::open ( char *  filename)

Definition at line 386 of file ojph_img_io.cpp.

References bit_depth, buffer, buffer_size, bytes_per_sample, cur_line, fh, fname, height, num_components, OJPH_ERROR, OJPH_WARN, and width.

Referenced by main().

◆ write()

ui32 ojph::ppm_out::write ( const line_buf line,
ui32  comp_num 
)
virtual

Member Data Documentation

◆ bit_depth

ui32 ojph::ppm_out::bit_depth
private

Definition at line 560 of file ojph_img_io.h.

Referenced by configure(), open(), ppm_out(), and write().

◆ buffer

ui8* ojph::ppm_out::buffer
private

Definition at line 561 of file ojph_img_io.h.

Referenced by open(), ppm_out(), write(), and ~ppm_out().

◆ buffer_size

ui32 ojph::ppm_out::buffer_size
private

Definition at line 562 of file ojph_img_io.h.

Referenced by open(), and ppm_out().

◆ bytes_per_line

ui32 ojph::ppm_out::bytes_per_line
private

Definition at line 563 of file ojph_img_io.h.

Referenced by configure(), and ppm_out().

◆ bytes_per_sample

ui32 ojph::ppm_out::bytes_per_sample
private

Definition at line 560 of file ojph_img_io.h.

Referenced by configure(), open(), ppm_out(), and write().

◆ converter

conversion_fun ojph::ppm_out::converter
private

Definition at line 564 of file ojph_img_io.h.

Referenced by configure(), ppm_out(), and write().

◆ cur_line

ui32 ojph::ppm_out::cur_line
private

Definition at line 563 of file ojph_img_io.h.

Referenced by open(), and ppm_out().

◆ fh

FILE* ojph::ppm_out::fh
private

Definition at line 557 of file ojph_img_io.h.

Referenced by close(), configure(), open(), ppm_out(), and write().

◆ fname

const char* ojph::ppm_out::fname
private

Definition at line 558 of file ojph_img_io.h.

Referenced by close(), open(), ppm_out(), and write().

◆ height

ui32 ojph::ppm_out::height
private

Definition at line 559 of file ojph_img_io.h.

Referenced by configure(), open(), and ppm_out().

◆ lptr

const line_buf* ojph::ppm_out::lptr[3]
private

Definition at line 565 of file ojph_img_io.h.

Referenced by ppm_out(), and write().

◆ num_components

ui32 ojph::ppm_out::num_components
private

Definition at line 559 of file ojph_img_io.h.

Referenced by configure(), open(), ppm_out(), and write().

◆ samples_per_line

ui32 ojph::ppm_out::samples_per_line
private

Definition at line 563 of file ojph_img_io.h.

Referenced by configure(), ppm_out(), and write().

◆ width

ui32 ojph::ppm_out::width
private

Definition at line 559 of file ojph_img_io.h.

Referenced by configure(), open(), ppm_out(), and write().


The documentation for this class was generated from the following files: