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/allocimbuf.c')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index a8b9e21331d..59772771f3b 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -84,17 +84,13 @@ void imb_freerectfloatImBuf(ImBuf *ibuf)
void imb_freerectImBuf(ImBuf *ibuf)
{
if(ibuf==NULL) return;
-
- if(ibuf->crect)
- MEM_freeN(ibuf->crect);
if(ibuf->rect && (ibuf->mall & IB_rect))
MEM_freeN(ibuf->rect);
+ ibuf->rect= NULL;
imb_freemipmapImBuf(ibuf);
-
- ibuf->rect= NULL;
- ibuf->crect= NULL;
+
ibuf->mall &= ~IB_rect;
}
@@ -346,6 +342,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flag
ibuf->depth= d;
ibuf->ftype= TGA;
ibuf->channels= 4; /* float option, is set to other values when buffers get assigned */
+ ibuf->ppm[0]= ibuf->ppm[1]= 150.0 / 0.0254; /* 150dpi -> pixels-per-meter */
if(flags & IB_rect) {
if(imb_addrectImBuf(ibuf)==FALSE) {