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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-27 23:28:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-27 23:28:44 +0400
commitd30c7356b7a3d9db803c227617a784dee7054371 (patch)
treec80d7db470a1a0d2937d0f5006fe2d2161c4a121 /source/blender/imbuf
parentf57c1c8b34f01bc7f03ab039dcb4058c655611e2 (diff)
missed tiff using 150 dpi as default in previous commit, use a define now.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c2
-rw-r--r--source/blender/imbuf/intern/imbuf.h2
-rw-r--r--source/blender/imbuf/intern/tiff.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 9b114f94cb0..5dff3e1aea0 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -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) {
diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h
index 47b4b7b6a58..999aae81cb7 100644
--- a/source/blender/imbuf/intern/imbuf.h
+++ b/source/blender/imbuf/intern/imbuf.h
@@ -72,5 +72,7 @@ typedef unsigned char uchar;
#define TRUE 1
#define FALSE 0
+#define IMB_DPI_DEFAULT 72.0f
+
#endif /* __IMBUF_H__ */
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 556ec64e59a..30dc61544b4 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -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);