missed tiff using 150 dpi as default in previous commit, use a define now.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 27 Jun 2012 19:28:44 +0000 (19:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 27 Jun 2012 19:28:44 +0000 (19:28 +0000)
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/imbuf.h
source/blender/imbuf/intern/tiff.c

index 9b114f94cb07a693feb8242459f159d9262a778c..5dff3e1aea0fa84970889fd4bbbcb83abdd440c4 100644 (file)
@@ -351,7 +351,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int
                ibuf->planes = planes;
                ibuf->ftype = TGA;
                ibuf->channels = 4;  /* float option, is set to other values when buffers get assigned */
-               ibuf->ppm[0] = ibuf->ppm[1] = 72.0 / 0.0254; /* 72dpi -> pixels-per-meter */
+               ibuf->ppm[0] = ibuf->ppm[1] = IMB_DPI_DEFAULT / 0.0254; /* IMB_DPI_DEFAULT -> pixels-per-meter */
                
                if (flags & IB_rect) {
                        if (imb_addrectImBuf(ibuf) == FALSE) {
index 47b4b7b6a58ab483fea6bc1e75f76ca948d5cec1..999aae81cb76d4aea24eb1c0f133b483467add61 100644 (file)
@@ -72,5 +72,7 @@ typedef unsigned char uchar;
 #define TRUE 1
 #define FALSE 0
 
+#define IMB_DPI_DEFAULT 72.0f
+
 #endif /* __IMBUF_H__ */
 
index 556ec64e59a3129be742f365063208f9888f8719..30dc61544b479b030fbe450cf3903d9c245842a9 100644 (file)
@@ -811,7 +811,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
                yres = (float)(ibuf->ppm[1] * 0.0254);
        }
        else {
-               xres = yres = 150.0f;
+               xres = yres = IMB_DPI_DEFAULT;
        }
 
        TIFFSetField(image, TIFFTAG_XRESOLUTION,     xres);