From 6263390e73edb77a79c452b1e3b121987555590e Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Fri, 2 Dec 2005 21:13:14 +0000 Subject: This commit does very little for the number of files touched. I updated gen_dynlibtiff.py so its in sync with the file(s) it creates. I added a little more documentation to the readme.txt for adding new file formats. I also added two dummy functions to the tiff.c so it stopped whining about them being NULL. (I'm still working on the reported bugs but thought this was a good time to at least get this in) Kent --- source/blender/imbuf/intern/tiff.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'source/blender/imbuf/intern/tiff.c') diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 9f5ecf18dd9..361ae9d198f 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -69,6 +69,10 @@ tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n); toff_t imb_tiff_SeekProc(thandle_t handle, toff_t ofs, int whence); int imb_tiff_CloseProc(thandle_t handle); toff_t imb_tiff_SizeProc(thandle_t handle); +int imb_tiff_DummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize); +void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size); + + /* Structure for in-memory TIFF file. */ struct ImbTIFFMemFile { unsigned char *mem; /* Location of first byte of TIFF file. */ @@ -84,6 +88,14 @@ struct ImbTIFFMemFile { *****************************/ +void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size) +{ +} + +int imb_tiff_DummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize) +{ + return (0); +} /** * Reads data from an in-memory TIFF file. @@ -308,8 +320,7 @@ struct ImBuf *imb_loadtiff(unsigned char *mem, int size, int flags) "r", (thandle_t)(&memFile), imb_tiff_ReadProc, imb_tiff_WriteProc, imb_tiff_SeekProc, imb_tiff_CloseProc, - imb_tiff_SizeProc, (TIFFMapFileProc)NULL, - (TIFFUnmapFileProc)NULL); + imb_tiff_SizeProc, imb_tiff_DummyMapProc, imb_tiff_DummyUnmapProc); if (image == NULL) { printf("imb_loadtiff: could not open TIFF IO layer.\n"); return NULL; -- cgit v1.2.3