image.h

来自「this is source code for image compressio」· C头文件 代码 · 共 40 行

H
40
字号
/*---------------------------------------------------------------------------*/
// Image Compression Toolbox v1.2
// written by
// Satish Kumar S
// satishkumr@lycos.com
//
// Copyright 1999 Satish Kumar S
//
// Permission is granted to use this software for research purposes as
// long as this notice stays attached to this software.
/*---------------------------------------------------------------------------*/
#ifndef _IMAGE_H
#define _IMAGE_H

class Image
{
public:
    double *data;           // the image data.
    int width, height;      // statistics of the image.

    Image() 
    { 
        data = NULL; 
        width = height = 0;
    }
    ~Image()
    {
        if (data) delete[] data;
        data = NULL;
        width = height = 0;
    }
    int LoadRawFile(char *fname, int width, int height);
    int SaveRawFile(char *fname, int mustscale = 0);
    int GetData(int x, int y, int xspan, int yspan, double *tdata);
    int SetData(int x, int y, int xspan, int yspan, double *tdata);
    int SetZeroBelow(double threshold);
    void InitEmptyImage(int w, int h);
};

#endif

⌨️ 快捷键说明

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