BMP256 not supported

4 次查看(过去 30 天)
Philip Chin
Philip Chin 2025-7-7
评论: Altaïr 2025-7-10
I get this "Warning: Image format 'bmp256' will not be supported in a future release. " on my code when saving graphics to bmp format.
Is there a work around possible?
  1 个评论
Altaïr
Altaïr 2025-7-10
Here's what I did in MATLAB R2025a to export the current figure in bmp format. However, I did not face any warnings.
fig = getframe(gcf); % Capture the current figure as an image
rgbImage = fig.cdata; % Extract the RGB image data
% Convert to indexed image with 256 colors
[indexedImage, cmap] = rgb2ind(rgbImage, 256);
% Save as BMP file
imwrite(indexedImage, cmap, 'myfigure.bmp', 'bmp');
If you still face the warning please attach a simplified code that can be executed to reproduce the warning.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

产品


版本

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by