MATLAB: Do I get an error when I execute the example given in documentation for IMREAD in MATLAB 7.8 (R2009a)

MATLAB

The Examples section for the documentation of IMREAD, gives the following code:
bg = [255 0 0];
A = imread('your_image.png','BackgroundColor',bg);
When I execute this example with my PNG image, I get the following error:
??? Error using ==> png
Invalid background color specification.
Error in ==> readpng at 58
[X,map] = png('read',filename, bg);
Error in ==> imread at 430
[X, map] = feval(fmt_s.read, filename, extraArgs{:});

Best Answer

This change has been incorporated into the documentation in Release 2009b (R2009b). For previous releases, read below for any additional information:
This is an error within the documentation for MATLAB 7.8 (R2009a) for the IMREAD function . The documentation should read as follows:
bg = [1 0 0];
A = imread('your_image.png','BackgroundColor',bg);