error when reading a bmp picture

조회 수: 3 (최근 30일)
Guillaume
Guillaume 2015년 1월 29일
댓글: Titus Edelhofer 2015년 1월 29일
Hello,
I try to read the attached picture with imread and to put the RGB values into the variable M
M = imread('test1.bmp');
but I get the following error:
Reference to non-existent field 'AlphaMask'.
Error in readbmpdata>bmpReadData32 (line 285)
rgbaMaskArray = [info.RedMask, info.GreenMask, info.BlueMask,
info.AlphaMask];
Error in readbmpdata (line 32)
X = bmpReadData32(info);
Error in readbmp (line 17)
X = readbmpdata(info);
Error in imread (line 415)
[X, map] = feval(fmt_s.read, filename, extraArgs{:});
Has anyone an idea where the error comes from? Thanks!
Cheers Guillaume
  댓글 수: 1
Titus Edelhofer
Titus Edelhofer 2015년 1월 29일
Hi Guillaume,
is it really a .bmp file? Sometimes such errors occur when the file is stored e.g. as .jpg and then renamed ...
Titus

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by