[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Author Index][Subject Index]
TrueColor displays
Dear Midas Users,
lately one user had problems with Midas displays on a TrueColor display
(i.e. 24 bits per pixels = 3 colors) with Linux.
After some testing we found, that the specific X-Server in use on that
machine was using actually only 24 bits per pixel. Sounds not surprising,
but up to now we only had encountered X-Servers which used 24 bits as 3*8 bits
per color per pixel, but stored each pixel actually in a full word,
i.e. 4 bytes (= 32 bits) per pixel were used in memory.
That can be seen when running our Xtest program for TrueColor displays:
$ /midas/98NOV/system/idiserv/src/Xtest.exe T
produces among other things:
Image structure attributes:
width = 530, height = 200
xoffset = 0, format = 2
bitmap_unit = 32, bitmap_pad = 32, depth = 24
bytes_per_line = 2120, bits_per_pixel = 32
Because the Xserver uses 4 bytes per pixel, we get:
bytes_per_line = 2120, bits_per_pixel = 32
for the 530*200 image, one line is: 530*4 = 2120.
On the machine with a "real" 24bit server we got:
Image structure attributes:
width = 530, height = 200
xoffset = 0, format = 2
bitmap_unit = 32, bitmap_pad = 32, depth = 24
bytes_per_line = 1592, bits_per_pixel = 24
Here the Xserver uses only 3 bytes per pixel in memory.
Thus 530*3 = 1590 bytes and since each line must fit into multiple words (or
a multiple of 4 (bytes)) it's padded up to 1592 bytes.
After this output the program crashed...
Unfortunately, we have no support yet for these Xservers - we implicitely
assume
32 bits per pixel in memory.
So, if you have problems with Midas and your TrueColor display, please,
execute first the Xtest.exe module as shown above and check the output
carefully for the ominous 1592 line size.
As soon as possible we'll look into that problem and hope to fix it.
Regards,
Klaus Banse