Borrar filtros
Borrar filtros

Creating .PNG image from temperature values

3 visualizaciones (últimos 30 días)
Oliver Ramos
Oliver Ramos el 14 de Oct. de 2020
Comentada: Ameer Hamza el 14 de Oct. de 2020
The size of my table (i.e. variables) is 462x622 double
I used the code below to create an image:
imagesc(image); colormap jet; axis off
However, the pixel size of the resulting image is 420x560.
How can I make an image with the same pixel size as the variables?

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 14 de Oct. de 2020
Editada: Ameer Hamza el 14 de Oct. de 2020
I guess you are using saveas() or some other function to save the .png file. They are not suitable for maintaining the resolution. Use imwrite() as shows in the following lines
image = round(rescale(image, 1, 256));
imwrite(image, jet, 'image.png');
  6 comentarios
Oliver Ramos
Oliver Ramos el 14 de Oct. de 2020
Thank you very much!!
Ameer Hamza
Ameer Hamza el 14 de Oct. de 2020
I am glad to be of help!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Red en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by