import opencv-3.4.6-8.el8
This commit is contained in:
parent
9c25a72191
commit
c5eac56b4d
31
SOURCES/opencv-3.4.6-cvSaveImage.patch
Normal file
31
SOURCES/opencv-3.4.6-cvSaveImage.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 6e1da2ef91907678159d40f600a56094c4d196b9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zhuo Zhang <zchrissirhcz@gmail.com>
|
||||||
|
Date: Fri, 25 Dec 2020 00:58:16 +0800
|
||||||
|
Subject: [PATCH] Merge pull request #19203 from zchrissirhcz:fix-cvSaveImage
|
||||||
|
|
||||||
|
Fix cvSaveImage( ) function bug
|
||||||
|
|
||||||
|
* fix cvSaveImage crash
|
||||||
|
|
||||||
|
* replace emplace_back with {}, no C++11 required
|
||||||
|
|
||||||
|
* fix MacOSX build with vector's push_back
|
||||||
|
---
|
||||||
|
modules/imgcodecs/src/loadsave.cpp | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules/imgcodecs/src/loadsave.cpp b/modules/imgcodecs/src/loadsave.cpp
|
||||||
|
index 4e626cd2165b..44c458c7273c 100644
|
||||||
|
--- a/modules/imgcodecs/src/loadsave.cpp
|
||||||
|
+++ b/modules/imgcodecs/src/loadsave.cpp
|
||||||
|
@@ -1001,7 +1001,9 @@ cvSaveImage( const char* filename, const CvArr* arr, const int* _params )
|
||||||
|
for( ; _params[i] > 0; i += 2 )
|
||||||
|
CV_Assert(static_cast<size_t>(i) < cv::CV_IO_MAX_IMAGE_PARAMS*2); // Limit number of params for security reasons
|
||||||
|
}
|
||||||
|
- return cv::imwrite_(filename, cv::cvarrToMat(arr),
|
||||||
|
+ std::vector<cv::Mat> img_vec;
|
||||||
|
+ img_vec.push_back(cv::cvarrToMat(arr));
|
||||||
|
+ return cv::imwrite_(filename, img_vec,
|
||||||
|
i > 0 ? std::vector<int>(_params, _params+i) : std::vector<int>(),
|
||||||
|
CV_IS_IMAGE(arr) && ((const IplImage*)arr)->origin == IPL_ORIGIN_BL );
|
||||||
|
}
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
Name: opencv
|
Name: opencv
|
||||||
Version: 3.4.6
|
Version: 3.4.6
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: Collection of algorithms for computer vision
|
Summary: Collection of algorithms for computer vision
|
||||||
# This is normal three clause BSD.
|
# This is normal three clause BSD.
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -69,6 +69,8 @@ Source1: %{name}_contrib-clean-%{version}.tar.gz
|
|||||||
# fix/simplify cmake config install location (upstreamable)
|
# fix/simplify cmake config install location (upstreamable)
|
||||||
# https://bugzilla.redhat.com/1031312
|
# https://bugzilla.redhat.com/1031312
|
||||||
Patch1: opencv-3.4.6-install_3rdparty_licenses.patch
|
Patch1: opencv-3.4.6-install_3rdparty_licenses.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2104776
|
||||||
|
Patch2: opencv-3.4.6-cvSaveImage.patch
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: cmake >= 2.6.3
|
BuildRequires: cmake >= 2.6.3
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
@ -214,6 +216,7 @@ to provide decent performance and stability.
|
|||||||
rm -r 3rdparty/
|
rm -r 3rdparty/
|
||||||
|
|
||||||
%patch1 -p1 -b .install_3rdparty_licenses
|
%patch1 -p1 -b .install_3rdparty_licenses
|
||||||
|
%patch2 -p1 -b .cvSaveImage
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
||||||
@ -373,6 +376,10 @@ popd
|
|||||||
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
%{_libdir}/libopencv_xphoto.so.%{abiver}*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 03 2022 Jiri Kucera <jkucera@redhat.com> - 3.4.6-8
|
||||||
|
- Fix cvSaveImage
|
||||||
|
Resolves: #2104776
|
||||||
|
|
||||||
* Fri Jan 07 2022 Jiri Kucera <jkucera@redhat.com> - 3.4.6-7
|
* Fri Jan 07 2022 Jiri Kucera <jkucera@redhat.com> - 3.4.6-7
|
||||||
- Add DNN support
|
- Add DNN support
|
||||||
Resolves: #2007780
|
Resolves: #2007780
|
||||||
|
Loading…
Reference in New Issue
Block a user