RobertVanA
06-07-2010, 05:17 PM
During reading a bitmap file an error occures. The statement
hq = color_table(k)
produces the error message:
"The variable (color_table(221)) has an undefined value."
followed by a traceback.
Color_table is an allocated array. The elements of this array and the scalar hq
are both of type RGBQUAD. Such a structure has 4 members, each being a 8-bit integer.
I have tried to remove the check: chk(u) but that did not changed anything.
I have tried to check whether a component has the "-117" value
(indicating "undefined") but that did not help.
Allocatable versus fixed length does, again, make no difference.
Reading simple integers in stead of the RGBQUAD structures show
the same error.
For your information: the error occured while reading a 8 bit .bmp file.
The 24 bit bmp files works fine.
Each component of the RGBQUAD structure is a 8 bit integer and
indicates an intensity of color. Therefore, any value
(between z'00' and z'FF') is allowed, so any bitpattern
is perfectly valid. "Undefined" can not be associated with any
form of problem-error.
When I skip the elements of the array that gives problem,
(by setting those RGBQUAD elements that causes the probleme to a determined value)
the final bitmap produces a well behaved picture on screen.
What 's going wrong here? How can I handle this type of hick-up?
Thanks!
Robert van Amerongen
hq = color_table(k)
produces the error message:
"The variable (color_table(221)) has an undefined value."
followed by a traceback.
Color_table is an allocated array. The elements of this array and the scalar hq
are both of type RGBQUAD. Such a structure has 4 members, each being a 8-bit integer.
I have tried to remove the check: chk(u) but that did not changed anything.
I have tried to check whether a component has the "-117" value
(indicating "undefined") but that did not help.
Allocatable versus fixed length does, again, make no difference.
Reading simple integers in stead of the RGBQUAD structures show
the same error.
For your information: the error occured while reading a 8 bit .bmp file.
The 24 bit bmp files works fine.
Each component of the RGBQUAD structure is a 8 bit integer and
indicates an intensity of color. Therefore, any value
(between z'00' and z'FF') is allowed, so any bitpattern
is perfectly valid. "Undefined" can not be associated with any
form of problem-error.
When I skip the elements of the array that gives problem,
(by setting those RGBQUAD elements that causes the probleme to a determined value)
the final bitmap produces a well behaved picture on screen.
What 's going wrong here? How can I handle this type of hick-up?
Thanks!
Robert van Amerongen