cv::imwrite() ".PNG" file saving throws error (Bug #933)


Added by Heesang Shin about 14 years ago. Updated about 13 years ago.


Status:Cancelled Start date:
Priority:Low Due date:
Assignee:- % Done:

0%

Category:highgui-images
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi,

using OpenCV 2.2 x86 distro on Windows7 x64

following code throws error

1string outputFileName.assign("default.png");
2cv::imwrite(outputFileName,image2); // image2 is [[IplImage]]

cv::imwrite method

"OpenCV Error: Unspecified error (could not find a writer for the specified exten
sion) in unknown function, file ..\..\..\OpenCVsvn\modules\highgui\src\loadsave.
cpp, line 276" 


Associated revisions

Revision 119b7a29
Added by Vadim Pisarevsky almost 12 years ago

Merge pull request #933 from pengx17:2.4_macfix_cont

Revision 3bfc6974
Added by Roman Donchenko almost 12 years ago

Merge remote-tracking branch 'origin/2.4' into merge-2.4

Merged pull requests:
#890 from caorong:patch-1
#893 from jet47:gpu-arm-fixes
#933 from pengx17:2.4_macfix_cont
#935 from pengx17:2.4_filter2d_fix
#936 from bitwangyaoyao:2.4_perf
#937 from bitwangyaoyao:2.4_fixPyrLK
#938 from pengx17:2.4_surf_sample
#939 from pengx17:2.4_getDevice
#940 from SpecLad:autolock
#941 from apavlenko:signed_char
#946 from bitwangyaoyao:2.4_samples2
#947 from jet47:fix-gpu-arm-build
#948 from jet47:cuda-5.5-support
#952 from SpecLad:jepg
#953 from jet47:fix-bug-3069
#955 from SpecLad:symlink
#957 from pengx17:2.4_fix_corner_detector
#959 from SpecLad:qt4-build
#960 from SpecLad:extra-modules

Conflicts:
modules/core/include/opencv2/core/core.hpp
modules/gpu/CMakeLists.txt
modules/gpu/include/opencv2/gpu/device/vec_math.hpp
modules/gpu/perf/perf_video.cpp
modules/gpuimgproc/src/cuda/hough.cu
modules/ocl/include/opencv2/ocl/ocl.hpp
modules/ocl/src/pyrlk.cpp
samples/gpu/driver_api_multi.cpp
samples/gpu/driver_api_stereo_multi.cpp
samples/ocl/surf_matcher.cpp

History

Updated by Alexander Shishkov about 13 years ago

You shouldn't use C++ interface with IplImage* objects, you should use cv::Mat class:

1IplImage* image = cvLoadImage("lena.jpg");
2string outputFileName;
3outputFileName.assign("lena.png");
4cv::imwrite(outputFileName,cv::Mat(image)); // image2 is IplImage?
5cvReleaseImage(&image);

Docs: http://opencv.itseez.com/modules/core/doc/basic_structures.html#mat-mat

  • Status changed from Open to Done
  • (deleted custom field) set to invalid

Updated by Andrey Kamaev about 13 years ago

  • Status changed from Done to Cancelled
  • Description changed from Hi, using [[OpenCV]] 2.2 x86 distro on Windows7 x64 following code throws e... to Hi, using OpenCV 2.2 x86 distro on Windows7 x64 following code throws error... More

Also available in: Atom PDF