⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image.h

📁 this is source code for image compression following jpeg2000 staandard
💻 H
字号:
/*---------------------------------------------------------------------------*/
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -