[140315] trunk/dports/graphics/opencv
stromnov at macports.org
stromnov at macports.org
Thu Sep 17 01:29:01 PDT 2015
Revision: 140315
https://trac.macports.org/changeset/140315
Author: stromnov at macports.org
Date: 2015-09-17 01:29:01 -0700 (Thu, 17 Sep 2015)
Log Message:
-----------
opencv: fix for TIFF reader (#47549)
Modified Paths:
--------------
trunk/dports/graphics/opencv/Portfile
Added Paths:
-----------
trunk/dports/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff
Modified: trunk/dports/graphics/opencv/Portfile
===================================================================
--- trunk/dports/graphics/opencv/Portfile 2015-09-17 08:26:18 UTC (rev 140314)
+++ trunk/dports/graphics/opencv/Portfile 2015-09-17 08:29:01 UTC (rev 140315)
@@ -7,7 +7,7 @@
name opencv
version 3.0.0
-revision 0
+revision 1
categories graphics science
platforms darwin
license BSD
@@ -54,7 +54,8 @@
patchfiles-append patch-install_name.diff \
patch-modules_python_CMakeLists.txt.diff \
- patch-modules_java_CMakeLists.txt.diff
+ patch-modules_java_CMakeLists.txt.diff \
+ patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff
# TODO: check and adapt those patches
# patch-modules_core_src_parallel.cpp.diff \
Added: trunk/dports/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff
===================================================================
--- trunk/dports/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff (rev 0)
+++ trunk/dports/graphics/opencv/files/patch-modules_imgcodecs_src_grfmt_tiff.cpp.diff 2015-09-17 08:29:01 UTC (rev 140315)
@@ -0,0 +1,16 @@
+--- modules/imgcodecs/src/grfmt_tiff.cpp.orig 2015-09-17 11:15:11.000000000 +0300
++++ modules/imgcodecs/src/grfmt_tiff.cpp 2015-09-17 11:16:06.000000000 +0300
+@@ -247,7 +247,12 @@
+ (!is_tiled && tile_height0 == std::numeric_limits<uint32>::max()) )
+ tile_height0 = m_height;
+
+- const size_t buffer_size = bpp * ncn * tile_height0 * tile_width0;
++ if(dst_bpp == 8) {
++ // we will use TIFFReadRGBA* functions, so allocate temporary buffer for 32bit RGBA
++ bpp = 8;
++ ncn = 4;
++ }
++ const size_t buffer_size = (bpp/bitsPerByte) * ncn * tile_height0 * tile_width0;
+ AutoBuffer<uchar> _buffer( buffer_size );
+ uchar* buffer = _buffer;
+ ushort* buffer16 = (ushort*)buffer;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150917/b21a4113/attachment.html>
More information about the macports-changes
mailing list