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
4ad45af5
Commit
4ad45af5
authored
Aug 01, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9253 from jbms:fix/image-decoding-tempfile
parents
37a7e08b
2be955a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
loadsave.cpp
modules/imgcodecs/src/loadsave.cpp
+9
-2
No files found.
modules/imgcodecs/src/loadsave.cpp
View file @
4ad45af5
...
@@ -651,8 +651,15 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
...
@@ -651,8 +651,15 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
if
(
!
f
)
if
(
!
f
)
return
0
;
return
0
;
size_t
bufSize
=
buf
.
cols
*
buf
.
rows
*
buf
.
elemSize
();
size_t
bufSize
=
buf
.
cols
*
buf
.
rows
*
buf
.
elemSize
();
fwrite
(
buf
.
ptr
(),
1
,
bufSize
,
f
);
if
(
fwrite
(
buf
.
ptr
(),
1
,
bufSize
,
f
)
!=
bufSize
)
fclose
(
f
);
{
fclose
(
f
);
CV_Error
(
CV_StsError
,
"failed to write image data to temporary file"
);
}
if
(
fclose
(
f
)
!=
0
)
{
CV_Error
(
CV_StsError
,
"failed to write image data to temporary file"
);
}
decoder
->
setSource
(
filename
);
decoder
->
setSource
(
filename
);
}
}
...
...
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