simple_image_writer_local.h

来自「JPEG2000实现的源码」· C头文件 代码 · 共 56 行

H
56
字号
/*****************************************************************************/
/* Copyright 1998, Hewlett-Packard Company                                   */
/* All rights reserved                                                       */
/* File: "simple_image_writer_local.h"                                       */
/* Description: Private definitions for "simple_image_writer.c"              */
/* Author: David Taubman                                                     */
/* Affiliation: Hewlett-Packard and                                          */
/*              The University of New South Wales, Australia                 */
/* Version: VM4.1                                                            */
/* Last Revised: 3 June, 1999                                                */
/*****************************************************************************/
#ifndef SIMPLE_IMAGE_WRITER_LOCAL_H
#define SIMPLE_IMAGE_WRITER_LOCAL_H
#include <image_io.h>
#include <stdio.h>

/*****************************************************************************/
/*                              image_component                              */
/*****************************************************************************/

typedef
  struct image_component {
    int rows, cols;
    int unwritten_rows;
    int line_bytes;
    FILE *fp;
    char *filename;
    int bitdepth;
    int is_signed;
    int pack_bytes;
  } image_component, *image_component_ptr;
  /* Manages specific information for a single image component.  Each
     component in the simple image writer has its own file.  Each component
     may have its own dimensions.  The bit-depth is given by the `bitdepth'
     field, while `is_signed' indicates whether or not the sample values
     contain signed two's complement data.  `pack_bytes' indicates the number
     of whole bytes into which each sample value is to be packed.  This should
     be a power of 2, i.e. 1,2 or 4.  The `bitdepth' bits of each sample value
     are the least significant bits within the (8*`pack_bits')-bit words which
     are written out. */

/*****************************************************************************/
/*                           simple_image_writer_obj                         */
/*****************************************************************************/

typedef
  struct simple_image_writer_obj {
    image_writer_obj base;
    int num_components;
    image_component_ptr components;
  } simple_image_writer_obj, *simple_image_writer_ref;
  /* Manages state for the externally visible `image_writer' object.
     Each component in the image has its own file in this simple case. */

#endif /* SIMPLE_IMAGE_WRITER_LOCAL_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?