Revision: 56711
http://sourceforge.net/p/brlcad/code/56711
Author: mohitdaga
Date: 2013-08-09 09:01:57 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
Cannot buffer more lines than the original image size. remove ioctl error in
pixscale and bwscale utilities
Modified Paths:
--------------
brlcad/trunk/src/util/bwscale.c
brlcad/trunk/src/util/pixscale.c
Modified: brlcad/trunk/src/util/bwscale.c
===================================================================
--- brlcad/trunk/src/util/bwscale.c 2013-08-09 05:53:03 UTC (rev 56710)
+++ brlcad/trunk/src/util/bwscale.c 2013-08-09 09:01:57 UTC (rev 56711)
@@ -190,7 +190,11 @@
*/
if (max > 4096) max = 4096;
- buflines = max;
+ if (max < iny)
+ buflines = max;
+ else
+ buflines = iny;
+
buf_start = (-buflines);
buffer = (unsigned char *)bu_calloc(buflines, len, "buffer");
}
Modified: brlcad/trunk/src/util/pixscale.c
===================================================================
--- brlcad/trunk/src/util/pixscale.c 2013-08-09 05:53:03 UTC (rev 56710)
+++ brlcad/trunk/src/util/pixscale.c 2013-08-09 09:01:57 UTC (rev 56711)
@@ -328,7 +328,11 @@
*/
if (max > 4096) max = 4096;
- buflines = max;
+ if (max < iny)
+ buflines = max;
+ else
+ buflines = iny;
+
buf_start = (-buflines);
buffer = bu_malloc(buflines * len, "buffer");
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits