Revision: 57367
          http://sourceforge.net/p/brlcad/code/57367
Author:   mohitdaga
Date:     2013-09-01 15:49:45 +0000 (Sun, 01 Sep 2013)
Log Message:
-----------
Add filesize options for fast reading. Also this retains backward compatible, 
that is if filesize options are not added, still it works. -courtesy 
Intelligent icv_read

Modified Paths:
--------------
    brlcad/trunk/src/util/bw-pix.c

Modified: brlcad/trunk/src/util/bw-pix.c
===================================================================
--- brlcad/trunk/src/util/bw-pix.c      2013-09-01 15:47:43 UTC (rev 57366)
+++ brlcad/trunk/src/util/bw-pix.c      2013-09-01 15:49:45 UTC (rev 57367)
@@ -35,17 +35,27 @@
 
 char *out_file = NULL;
 char *in_file = NULL;
+int inx=0, iny=0;
 
 int
 get_args(int argc, char **argv)
 {
     int c;
 
-    while ((c = bu_getopt(argc, argv, "o:h?")) != -1) {
+    while ((c = bu_getopt(argc, argv, "s:w:n:o:h?")) != -1) {
        switch (c) {
            case 'o':
                out_file = bu_optarg;
                break;
+           case 's' :
+               inx = iny = atoi(bu_optarg);
+               break;
+            case 'w' :
+               inx = atoi(bu_optarg);
+               break;
+            case 'n' :
+               iny = atoi(bu_optarg);
+               break;
            case 'h':
            default:            /* '?' */
                return 0;
@@ -83,7 +93,7 @@
        return 1;
     }
 
-    img = icv_read(in_file, ICV_IMAGE_BW, 0, 0);
+    img = icv_read(in_file, ICV_IMAGE_BW, inx, iny);
     if (img == NULL)
        return 1;
     icv_gray2rgb(img);

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