Revision: 56249
http://sourceforge.net/p/brlcad/code/56249
Author: mohitdaga
Date: 2013-07-27 01:25:49 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
Improves pix_save function. Now this can save images of type
ICV_COLOR_SPACE_GRAY. This uses icv_gray2rgb(..).
Modified Paths:
--------------
brlcad/trunk/src/libicv/fileformat.c
Modified: brlcad/trunk/src/libicv/fileformat.c
===================================================================
--- brlcad/trunk/src/libicv/fileformat.c 2013-07-27 01:08:55 UTC (rev
56248)
+++ brlcad/trunk/src/libicv/fileformat.c 2013-07-27 01:25:49 UTC (rev
56249)
@@ -235,10 +235,11 @@
int fd;
long int ret, size;
- /* TODO :: ADD functions which converts to GRAY Color Space */
- if (bif->color_space != ICV_COLOR_SPACE_RGB) {
- bu_log("bw_save : Color Space conflict");
- return -1;
+ if (bif->color_space == ICV_COLOR_SPACE_GRAY) {
+ icv_image_gray2rgb(bif);
+ } else if (bif->color_space != ICV_COLOR_SPACE_RGB) {
+ bu_log("bw_save : Color Space conflict");
+ return -1;
}
data = data2uchar(bif);
size = bif->width*bif->height*3;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits