imwrite error saying 'TransparentColor' is not a recognized parameter
Mostrar comentarios más antiguos
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);
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 8 de En. de 2020
0 votos
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.)
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!