Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/IMB_filetype.h1
-rw-r--r--source/blender/imbuf/intern/filetype.c5
-rw-r--r--source/blender/imbuf/intern/tiff.c16
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h
index f6afe20cb5c..9fd4108bee9 100644
--- a/source/blender/imbuf/intern/IMB_filetype.h
+++ b/source/blender/imbuf/intern/IMB_filetype.h
@@ -109,6 +109,7 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, int size, int flags);
int imb_savehdr(struct ImBuf * ibuf, char *name, int flags);
/* tiff */
+void imb_inittiff(void);
int imb_is_a_tiff(unsigned char *buf);
struct ImBuf *imb_loadtiff(unsigned char *mem, int size, int flags);
void imb_loadtiletiff(struct ImBuf *ibuf, unsigned char *mem, int size,
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index a0ff4476556..c2140e12013 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -54,9 +54,6 @@ void quicktime_init(void);
void quicktime_exit(void);
#endif
-void libtiff_init(void);
-void libtiff_exit(void);
-
ImFileType IMB_FILE_TYPES[]= {
{NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC},
{NULL, NULL, imb_is_a_jpeg, imb_ftype_default, imb_load_jpeg, imb_savejpeg, NULL, 0, JPG},
@@ -66,7 +63,7 @@ ImFileType IMB_FILE_TYPES[]= {
{NULL, NULL, imb_is_dpx, imb_ftype_default, imb_loaddpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX},
{NULL, NULL, imb_is_cineon, imb_ftype_default, imb_loadcineon, imb_savecineon, NULL, IM_FTYPE_FLOAT, CINEON},
#ifdef WITH_TIFF
- {NULL, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF},
+ {imb_inittiff, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF},
#elif defined(__APPLE__) && defined(IMBUF_COCOA)
{NULL, NULL, imb_is_a_cocoa, imb_ftype_cocoa, imb_imb_cocoaLoadImage, imb_savecocoa, NULL, 0, TIF},
#endif
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 488340aec88..99f74fea640 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -356,6 +356,7 @@ static void scanline_separate_32bit(float *rectf, float *fbuf, int scanline_w, i
}
+#if 0
/*
* Use the libTIFF RGBAImage API to read a TIFF image.
* This function uses the "RGBA Image" support from libtiff, which enables
@@ -387,6 +388,7 @@ static int imb_read_tiff_pixels_rgba(ImBuf *ibuf, TIFF *image, int premul)
return success;
}
+#endif
/*
* Use the libTIFF scanline API to read a TIFF image.
@@ -409,12 +411,6 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
TIFFGetField(image, TIFFTAG_PLANARCONFIG, &config);
scanline = TIFFScanlineSize(image);
- /* if file has an unsupported channel count, use libTIFF to
- * convert to an 8 bit RGBA image */
- if (!ELEM(spp, 3, 4))
- return imb_read_tiff_pixels_rgba(ibuf, image, premul);
-
-
if (bitspersample == 32) {
ib_flag = IB_rectfloat;
fbuf = (float *)_TIFFmalloc(scanline);
@@ -427,7 +423,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
}
tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag, 0);
-
+
/* contiguous channels: RGBRGBRGB */
if (config == PLANARCONFIG_CONTIG) {
for (row = 0; row < ibuf->y; row++) {
@@ -512,6 +508,12 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
return success;
}
+void imb_inittiff(void)
+{
+ if (!(G.f & G_DEBUG))
+ TIFFSetErrorHandler(NULL);
+}
+
/**
* Loads a TIFF file.
*