Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
58fb8692
Commit
58fb8692
authored
Sep 17, 2012
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test for png encoding bug #2352
parent
03daf448
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
test_grfmt.cpp
modules/highgui/test/test_grfmt.cpp
+31
-1
No files found.
modules/highgui/test/test_grfmt.cpp
View file @
58fb8692
...
...
@@ -217,11 +217,41 @@ public:
}
};
#ifdef HAVE_PNG
TEST
(
Highgui_Image
,
write_big
)
{
CV_GrfmtWriteBigImageTest
test
;
test
.
safe_run
();
}
TEST
(
Highgui_Image
,
write_big
)
{
CV_GrfmtWriteBigImageTest
test
;
test
.
safe_run
();
}
#endif
TEST
(
Highgui_Image
,
write_imageseq
)
{
CV_GrfmtWriteSequenceImageTest
test
;
test
.
safe_run
();
}
TEST
(
Highgui_Image
,
read_bmp_rle8
)
{
CV_GrfmtReadBMPRLE8Test
test
;
test
.
safe_run
();
}
#ifdef HAVE_PNG
class
CV_GrfmtPNGEncodeTest
:
public
cvtest
::
BaseTest
{
public
:
void
run
(
int
)
{
try
{
vector
<
uchar
>
buff
;
Mat
im
=
Mat
::
zeros
(
1000
,
1000
,
CV_8U
);
//randu(im, 0, 256);
vector
<
int
>
param
;
param
.
push_back
(
CV_IMWRITE_PNG_COMPRESSION
);
param
.
push_back
(
3
);
//default(3) 0-9.
cv
::
imencode
(
".png"
,
im
,
buff
,
param
);
// hangs
Mat
im2
=
imdecode
(
buff
,
CV_LOAD_IMAGE_ANYDEPTH
);
}
catch
(...)
{
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_EXCEPTION
);
}
ts
->
set_failed_test_info
(
cvtest
::
TS
::
OK
);
}
};
TEST
(
Highgui_Image
,
encode_png
)
{
CV_GrfmtPNGEncodeTest
test
;
test
.
safe_run
();
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment