vtkBMPReader computes wrong header (data offset) for BMP file generated by Photoshop
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When reading a 256 color (8 bit)BMP file generated by Photoshop the image is shifted by two bytes.
During debug inspection of the header size returned by vtkBMPReader::GetHeaderSize() showed that vtkBMPReader returned a header size of 1080 instead of the expected 1078.
Inspection of image data showed that vtkBMPReader started reading the image data at offset 1080 instead of 1078.
Using vtkBMPReader::SetHeaderSize(1078) correctly reads the image.
The data offset value within the BMP file is 1078, so not sure why vtkBMPReader::GetHeaderSize() is reporting 1080.
NOTE: This may be the underlying issue for bug #13495 (closed)
The BMP file used in testing is attached.
As a work around when reading BMP files I check the header size and if the header size is reported as 1080 I use SetHeaderSize to set it to 1078. Not the best solution, but since 1080 is an invalid header size for the supported BMP formats it should have no ill effects.