Revision: 57281
          http://sourceforge.net/p/brlcad/code/57281
Author:   mohitdaga
Date:     2013-08-29 21:44:28 +0000 (Thu, 29 Aug 2013)
Log Message:
-----------
Add pixel buffer option in pix_read(along with r57280). This makes pix_read 
more powerfull by having an ability to read without the size specified (similar 
to r57279 for bw_read).

Revision Links:
--------------
    http://sourceforge.net/p/brlcad/code/57280
    http://sourceforge.net/p/brlcad/code/57279

Modified Paths:
--------------
    brlcad/trunk/src/libicv/pix.c

Modified: brlcad/trunk/src/libicv/pix.c
===================================================================
--- brlcad/trunk/src/libicv/pix.c       2013-08-29 21:38:48 UTC (rev 57280)
+++ brlcad/trunk/src/libicv/pix.c       2013-08-29 21:44:28 UTC (rev 57281)
@@ -108,7 +108,7 @@
        bif->height = 1;
        bif->width = (int) size/3;
     } else { /* buffer frame wise */
-       size = (size_t) height*width;
+       size = (size_t) height*width*3;
        data = (unsigned char *)bu_malloc(size, "pix_read : unsigned char 
data");
        if (read(fd, data, size) < 0) {
            bu_log("pix_read: Error Occurred while Reading\n");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to