libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd image_convert.h


From: Edward Rosten
Subject: [libcvd-members] libcvd/cvd image_convert.h
Date: Mon, 12 Jan 2009 11:53:49 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        09/01/12 11:53:49

Modified files:
        cvd            : image_convert.h 

Log message:
        Added more BasicImage prototypes to fix ColourspaceBuffer.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/image_convert.h?cvsroot=libcvd&r1=1.13&r2=1.14

Patches:
Index: image_convert.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/image_convert.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- image_convert.h     4 Jan 2009 15:50:06 -0000       1.13
+++ image_convert.h     12 Jan 2009 11:53:49 -0000      1.14
@@ -109,6 +109,18 @@
     return to;
   }
   
+  /// Convert an image from one type to another using the default.
+  /// @param D The destination image pixel type
+  /// @param C The source image pixel type
+  /// @param from The image to convert from
+  /// @ingroup gImageIO
+  template<class D, class C> Image<D> convert_image(const BasicImage<C>& from)
+  {
+    Image<D> to(from.size());
+    convert_image(from, to);
+    return to;
+  }
+  
   // Function name changed from 'convert_image' to prevent compile-time
   // error arising from the clash with a function of same name declared above.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]