backup
This commit is contained in:
70
include/amscimglib4/amscimglib4.h
Normal file
70
include/amscimglib4/amscimglib4.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef __AMSCIMGLIB4_H__
|
||||
#define __AMSCIMGLIB4_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef EXPORT_AMSCIMGLIB4
|
||||
#define AMSCIMGLIB4_API __declspec(dllexport)
|
||||
#else
|
||||
#define AMSCIMGLIB4_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
//#define AMSCPPDLL_API __attribute__((visibility("default")))
|
||||
#define AMSCIMGLIB4_API
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
AMSCIMGLIB4_API int amscppdlltemplate_exportedtestfn(int a, int b);
|
||||
|
||||
static const int amscimglib4_success = 0;
|
||||
static const int amscimglib4_failure = -1;
|
||||
|
||||
|
||||
// Main Dynamic Image Structure
|
||||
//bytebuf contans RGBARGBA information in the following order:
|
||||
//to access pixel [I,J] color C, [I+J*sizex]*4+C
|
||||
typedef struct amscimglib4_image
|
||||
{
|
||||
int sizex;
|
||||
int sizey;
|
||||
unsigned char *bytebuf; //size 4*sizex*sizey, [color + I*4 + J*4*sizex]
|
||||
} amscimglib4_image;
|
||||
|
||||
AMSCIMGLIB4_API int amscimglib4_image_new(amscimglib4_image **imgptr, int _sizex, int _sizey);
|
||||
|
||||
|
||||
AMSCIMGLIB4_API int amscimglib4_image_delete(amscimglib4_image **imgptr);
|
||||
|
||||
|
||||
AMSCIMGLIB4_API int amscimglib4_image_resize(amscimglib4_image *imgptr, int _sizex, int _sizey);
|
||||
|
||||
//sets all pixels in the image to (0,0,0,0)
|
||||
AMSCIMGLIB4_API void amscimglib4_image_clear(amscimglib4_image *imgptr);
|
||||
|
||||
//copies an image from one image struct to another
|
||||
//resizes imgto
|
||||
//AMSIMG_API void amsimg_copy_image(amsimg_image *imgfrom, amsimg_image *imgto);
|
||||
AMSCIMGLIB4_API int amscimglib4_copy_image(const amscimglib4_image *imgfrom, amscimglib4_image *imgto);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Some limited image manipulation routines //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
//transposes an image
|
||||
AMSCIMGLIB4_API int amscimglib4_transpose_image(amscimglib4_image *img);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}; // end extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
11
include/amscimglib4/amscimglib4_intl.h
Normal file
11
include/amscimglib4/amscimglib4_intl.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __AMSCIMGLIB4_INTL_HPP__
|
||||
#define __AMSCIMGLIB4_INTL_HPP__
|
||||
|
||||
#include <amscimglib4/amscimglib4_tests.h>
|
||||
|
||||
//returns the size of a file using ANSI C
|
||||
unsigned int amscimglib4_filesize(FILE *fp);
|
||||
|
||||
|
||||
#endif
|
||||
|
7
include/amscimglib4/amscimglib4_tests.h
Normal file
7
include/amscimglib4/amscimglib4_tests.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __AMSCIMGLIB4_TESTS_HPP__
|
||||
#define __AMSCIMGLIB4_TESTS_HPP__
|
||||
|
||||
void amscimglib4_test_init();
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user