[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd cvd/colourspace_convert.h cvd/image_conv...
From: |
Colin Starr |
Subject: |
[libcvd-members] libcvd cvd/colourspace_convert.h cvd/image_conv... |
Date: |
Mon, 15 May 2006 15:59:00 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Branch:
Changes by: Colin Starr <address@hidden> 06/05/15 15:59:00
Modified files:
cvd : colourspace_convert.h image_convert.h
cvd_src : colourspace_convert.cxx
Log message:
Changed function name from 'convert_image' to 'convert_image_pair' to
resolve compile-time conflict between this function and a different function
with the same signature (but different return type).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd/colourspace_convert.h.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd/image_convert.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/libcvd/libcvd/cvd_src/colourspace_convert.cxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: libcvd/cvd/colourspace_convert.h
diff -u libcvd/cvd/colourspace_convert.h:1.8
libcvd/cvd/colourspace_convert.h:1.9
--- libcvd/cvd/colourspace_convert.h:1.8 Thu Mar 16 14:04:30 2006
+++ libcvd/cvd/colourspace_convert.h Mon May 15 15:58:59 2006
@@ -67,10 +67,13 @@
/// @ingroup gImageIO
template<> void convert_image(const BasicImage<yuv422>& from,
BasicImage<byte>& to);
+ // Name changed from 'convert_image' to prevent conflict with previous
convert_image
+ // with same method signature.
+
/// Convert YUV 411 pixel data to both Y and RGB
/// @param from The input data
/// @ingroup gImageIO
- template<> std::pair<Image<byte>,Image<Rgb<byte> > >
convert_image(const BasicImage<yuv411>& from);
+ template<> std::pair<Image<byte>,Image<Rgb<byte> > >
convert_image_pair(const BasicImage<yuv411>& from);
/// Convert VUY 422 pixel data to RGB
Index: libcvd/cvd/image_convert.h
diff -u libcvd/cvd/image_convert.h:1.9 libcvd/cvd/image_convert.h:1.10
--- libcvd/cvd/image_convert.h:1.9 Fri Dec 9 05:49:07 2005
+++ libcvd/cvd/image_convert.h Mon May 15 15:58:59 2006
@@ -108,7 +108,17 @@
return to;
}
- template<class D1, class D2, class C> std::pair<Image<D1>, Image<D2> >
convert_image(const BasicImage<C>& from)
+ // Function name changed from 'convert_image' to prevent compile-time
+ // error arising from the clash with a function of same name declared above.
+
+ /// Convert an image from one type to another using the default, returning a
pair of images.
+ /// @param D1 The first destination image pixel type
+ /// @param D2 The second destination image pixel type
+ /// @param C The source image pixel type
+ /// @param from The image to convert from
+ /// @ingroup gImageIO
+
+ template<class D1, class D2, class C> std::pair<Image<D1>, Image<D2> >
convert_image_pair(const BasicImage<C>& from)
{
std::pair<Image<D1>, Image<D2> > to(Image<D1>(from.size()),
Image<D2>(from.size()));
convert_image(from, to.first);
Index: libcvd/cvd_src/colourspace_convert.cxx
diff -u libcvd/cvd_src/colourspace_convert.cxx:1.6
libcvd/cvd_src/colourspace_convert.cxx:1.7
--- libcvd/cvd_src/colourspace_convert.cxx:1.6 Tue Dec 27 10:23:13 2005
+++ libcvd/cvd_src/colourspace_convert.cxx Mon May 15 15:59:00 2006
@@ -64,7 +64,9 @@
ColourSpace::yuv422_to_grey(reinterpret_cast<const byte*>(from.data()),
to.data(), from.size().x, from.size().y);
}
- template<> std::pair<Image<byte>,Image<Rgb<byte> > > convert_image(const
BasicImage<yuv411>& from)
+ // Name changed from 'convert_image' to prevent conflict with previous
convert_image
+ // with same method signature.
+ template<> std::pair<Image<byte>,Image<Rgb<byte> > >
convert_image_pair(const BasicImage<yuv411>& from)
{
Image<byte> rety(from.size());
Image<Rgb<byte> > retc(from.size());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd cvd/colourspace_convert.h cvd/image_conv...,
Colin Starr <=