1
/** \file blender/imbuf/intern/cineon/logImageLib.h
5
* Common library definitions for Cineon and DPX image files.
7
* Copyright 1999,2000,2001 David Hodson <hodsond@acm.org>
9
* This program is free software; you can redistribute it and/or modify it
10
* under the terms of the GNU General Public License as published by the Free
11
* Software Foundation; either version 2 of the License, or (at your option)
14
* This program is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
#ifndef __LOGIMAGELIB_H__
26
#define __LOGIMAGELIB_H__
33
* Image structure. You don't care what this is.
36
typedef struct _Log_Image_File_t_ LogImageFile;
39
* Magic numbers for normal and byte-swapped Cineon and Dpx files
42
#define CINEON_FILE_MAGIC 0x802A5FD7
43
#define DPX_FILE_MAGIC 0x53445058
46
* Image 8 bit <-> 10 bit conversion parameters.
54
} LogImageByteConversionParameters;
56
/* int functions return 0 for OK */
58
void logImageSetVerbose(int);
60
LogImageFile* logImageOpenFromMem(unsigned char *buffer, unsigned int size, int cineon);
61
LogImageFile* logImageOpen(const char* filename, int cineon);
62
int logImageGetSize(const LogImageFile* logImage, int* xsize, int* ysize, int* channels);
63
LogImageFile* logImageCreate(const char* filename, int cineon, int xsize, int ysize, int channels);
65
/* byte conversion routines for mapping logImage (usually) 10 bit values to 8 bit */
66
/* see Kodak docs for details... */
68
int logImageGetByteConversionDefaults(LogImageByteConversionParameters* params);
69
int logImageGetByteConversion(const LogImageFile* logImage, LogImageByteConversionParameters* params);
70
int logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionParameters* params);
72
/* get/set scanline of converted bytes */
73
int logImageGetRowBytes(LogImageFile* logImage, unsigned short* row, int y);
74
int logImageSetRowBytes(LogImageFile* logImage, const unsigned short* row, int y);
76
/* closes file and deletes data */
77
void logImageClose(LogImageFile* logImage);
79
/* read file and dump header info */
80
void logImageDump(const char* filename);
86
#endif /* __LOGIMAGELIB_H__ */