Forum > Linux

How to determine the color depth of a monitor in Linux

(1/3) > >>

KumurTash:
for Windows, the color depth of the device can be determined using the winapi - GetDeviceCaps functi

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var     dc:HDC;    depth:integer;    begin   dc := GetDC(0);     depth := GetDeviceCaps(dc, PLANES) * GetDeviceCaps(dc, BITSPIXEL);   result:=depth;end; 

How to implement this in Linux?

PKTKS:
very simple and plain ...  using XLIB unit


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    PVisual = ^TVisual;   TVisual = record        ext_data : PXExtData;        visualid : TVisualID;        c_class : cint;        red_mask, green_mask, blue_mask : culong;        bits_per_rgb : cint;        map_entries : cint;     end;  
Paul

Thaddy:
Use simply Lazarus TScreen....

winni:

--- Quote from: Thaddy on May 23, 2022, 07:17:20 pm ---Use simply Lazarus TScreen....

--- End quote ---

Where exact??

winni:
Hi!

There is no info about the color depth in TScreen

Winni

Navigation

[0] Message Index

[#] Next page

Go to full version