Imwrite creates 8bit tif file despite 16bit input
Mostrar comentarios más antiguos
I have several 16bit images in a 3D array A. I want to save those images as one tiff file. However when using imwrite the images are stored as 8bit file.
The code is:
imwrite(A(:,:,1),'folderpath/test123.tif');
for n = [2:1:amount_of_images]
imwrite(A(:,:,n),'folderpath/test123.tif','WriteMode','append');
end
In the target folder one 8bit tif file appears, which is copletly white since all values in the original image are above 2^8-1
In the "current folder section" on the left the tiff file is also declared as 8bit. Judging by the documentation imwrite should recognise the 16bit, right? What am I doing wrong?
P.S. I am using R2019b
2 comentarios
Walter Roberson
el 5 de Ag. de 2020
What is class(A) ?
Malte Römer-Stumm
el 6 de Ag. de 2020
Respuesta aceptada
Más respuestas (0)
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!