imwrite error saying 'TransparentColor' is not a recognized parameter
이전 댓글 표시
I am trying to remove the black background created when using imwarp and read that it can be done when exporting the images. the error I get is:
Error using writetif>parse_param_value_pairs (line 161)
'TransparentColor' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this function.
However when using
doc imwrite
it exist as a Name-Value pair argument (imwrite) with the example 'TransparentColor', 20. So therefore I added 20 jut to try it out (black might be another colour).
This is part of the code I am trying to get to work, where movingReg is a uint8 object. Why is it giving me this error?
imwrite(movingReg ,fullfile('C:\Users\X\Documents\Matlab\multiplex\55D-A',string(['moved',num2str(number(num)),'.TIF'])),'TransparentColor',20);
채택된 답변
추가 답변 (1개)
Steven Lord
2020년 1월 8일
0 개 추천
That argument appears in a section on the documentation page describing functionality available for the GIF format, not for the TIFF format. Some of the options are supported for several of the formats (WriteMode is supported for both GIF and TIFF, for example) while others are specific to just one of the formats (like TransparentColor to GIF.)
카테고리
도움말 센터 및 File Exchange에서 Image Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!