Revision: 56625
http://sourceforge.net/p/brlcad/code/56625
Author: mohitdaga
Date: 2013-08-06 15:11:05 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
Trailing WS
Modified Paths:
--------------
brlcad/trunk/src/libicv/bw.c
brlcad/trunk/src/libicv/decimate.c
brlcad/trunk/src/libicv/encoding.c
brlcad/trunk/src/libicv/pix.c
Modified: brlcad/trunk/src/libicv/bw.c
===================================================================
--- brlcad/trunk/src/libicv/bw.c 2013-08-06 15:07:16 UTC (rev 56624)
+++ brlcad/trunk/src/libicv/bw.c 2013-08-06 15:11:05 UTC (rev 56625)
@@ -50,25 +50,25 @@
size_t ret, size;
if (bif->color_space == ICV_COLOR_SPACE_RGB) {
- icv_rgb2gray(bif, 0, 0, 0, 0, 0);
+ icv_rgb2gray(bif, 0, 0, 0, 0, 0);
} else if (bif->color_space != ICV_COLOR_SPACE_GRAY) {
- bu_log("bw_save : Color Space conflict");
- return -1;
+ bu_log("bw_save : Color Space conflict");
+ return -1;
}
data = data2uchar(bif);
size = (size_t) bif->height*bif->width;
fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, WRMODE);
if (fd < 0) {
- bu_log("Unable to open the file\n");
- return -1;
+ bu_log("Unable to open the file\n");
+ return -1;
}
ret = write(fd, data, size);
close(fd);
bu_free(data, "bw_save : Unsigned Char data");
if (ret != size) {
- bu_log("bw_save : Short Write\n");
- return -1;
+ bu_log("bw_save : Short Write\n");
+ return -1;
}
return 0;
@@ -84,21 +84,21 @@
size_t size;
if (width == 0 || height == 0) {
- height = 512;
- width = 512;
+ height = 512;
+ width = 512;
}
size = (size_t) height*width;
if ((fd = open(filename, O_RDONLY, WRMODE))<0) {
- bu_log("bw_load: Cannot open file for reading\n");
- return NULL;
+ bu_log("bw_load: Cannot open file for reading\n");
+ return NULL;
}
data = (unsigned char *)bu_malloc(size, "bw_load : unsigned char data");
if (read(fd, data, size) !=0) {
- bu_log("bw_load: Error Occurred while Reading\n");
- bu_free(data, "icv_image data");
- return NULL;
+ bu_log("bw_load: Error Occurred while Reading\n");
+ bu_free(data, "icv_image data");
+ return NULL;
}
BU_ALLOC(bif, struct icv_image);
ICV_IMAGE_INIT(bif);
Modified: brlcad/trunk/src/libicv/decimate.c
===================================================================
--- brlcad/trunk/src/libicv/decimate.c 2013-08-06 15:07:16 UTC (rev 56624)
+++ brlcad/trunk/src/libicv/decimate.c 2013-08-06 15:11:05 UTC (rev 56625)
@@ -42,9 +42,9 @@
for (y=0; y<bif->height; y+=factor)
for (x=0; x<bif->width; x+=factor) {
- for (c=0; c<bif->channels; c++) {
- p[c]= 0;
- }
+ for (c=0; c<bif->channels; c++) {
+ p[c]= 0;
+ }
for (py = 0; py < factor; py++) {
data_p = bif->data + (y+py)*widthstep;
Modified: brlcad/trunk/src/libicv/encoding.c
===================================================================
--- brlcad/trunk/src/libicv/encoding.c 2013-08-06 15:07:16 UTC (rev 56624)
+++ brlcad/trunk/src/libicv/encoding.c 2013-08-06 15:11:05 UTC (rev 56625)
@@ -52,9 +52,9 @@
char_p = data;
double_p = double_data = (double *) bu_malloc(size*sizeof(double),
"uchar2data : double data");
for (i=0; i<size; i++) {
- *double_p = ICV_CONV_8BIT(*char_p);
- double_p++;
- char_p++;
+ *double_p = ICV_CONV_8BIT(*char_p);
+ double_p++;
+ char_p++;
}
return double_data;
@@ -84,22 +84,22 @@
double_p = bif->data;
if (ZERO(bif->gamma_corr)) {
- for (i=0; i<size; i++) {
+ for (i=0; i<size; i++) {
*char_p = (unsigned char)((*double_p)*255.0 +0.5) ;
char_p++;
double_p++;
- }
+ }
} else {
- float *rand_p;
- double ex = 1.0/bif->gamma_corr;
- bn_rand_init(rand_p, 0);
+ float *rand_p;
+ double ex = 1.0/bif->gamma_corr;
+ bn_rand_init(rand_p, 0);
- for (i=0; i<size; i++) {
+ for (i=0; i<size; i++) {
*char_p = floor(pow(*double_p, ex)*255.0 + (double)
bn_rand0to1(rand_p) + 0.5);
char_p++;
double_p++;
- }
+ }
}
return uchar_data;
Modified: brlcad/trunk/src/libicv/pix.c
===================================================================
--- brlcad/trunk/src/libicv/pix.c 2013-08-06 15:07:16 UTC (rev 56624)
+++ brlcad/trunk/src/libicv/pix.c 2013-08-06 15:11:05 UTC (rev 56625)
@@ -49,10 +49,10 @@
size_t ret, size;
if (bif->color_space == ICV_COLOR_SPACE_GRAY) {
- icv_gray2rgb(bif);
+ icv_gray2rgb(bif);
} else if (bif->color_space != ICV_COLOR_SPACE_RGB) {
- bu_log("pix_save : Color Space conflict");
- return -1;
+ bu_log("pix_save : Color Space conflict");
+ return -1;
}
data = data2uchar(bif);
size = (size_t) bif->width*bif->height*3;
@@ -60,8 +60,8 @@
ret = write(fd, data, size);
close(fd);
if (ret != size) {
- bu_log("pix_save : Short Write");
- return -1;
+ bu_log("pix_save : Short Write");
+ return -1;
}
return 0;
}
@@ -77,21 +77,21 @@
size_t size;
if (width == 0 || height == 0) {
- height = 512;
- width = 512;
+ height = 512;
+ width = 512;
}
size = (size_t) height*width*3;
if ((fd = open(filename, O_RDONLY, WRMODE))<0) {
- bu_log("pix_load: Cannot open file for reading\n");
- return NULL;
+ bu_log("pix_load: Cannot open file for reading\n");
+ return NULL;
}
data = (unsigned char *)bu_malloc(size, "pix_load : unsigned char data");
if (read(fd, data, size) !=0) {
- bu_log("pix_load: Error Occurred while Reading\n");
- bu_free(data, "icv_image data");
- return NULL;
+ bu_log("pix_load: Error Occurred while Reading\n");
+ bu_free(data, "icv_image data");
+ return NULL;
}
BU_ALLOC(bif, struct icv_image);
ICV_IMAGE_INIT(bif);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
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