support for reading/writing image resolution (dpi), for PNG and TIFF,
[blender-staging.git] / source / blender / imbuf / intern / allocimbuf.c
index efa37aa119661128ffe296a2fe2a69471a7e8a0a..91583f02a4969a2fa66f8e5949d6188393b10a00 100644 (file)
@@ -348,6 +348,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) {