Получить текущую глубину цвета

Советы » Цвета и Палитра » Получить текущую глубину цвета

function

GetColorDepth: string

; var

DesktopDC: HDC; // LongWord BitsPerPixel: Integer; begin

DesktopDC := GetDC(0); BitsPerPixel := GetDeviceCaps(DesktopDC, BITSPIXEL); case

BitsPerPixel of

4: Result := '4-Bit'; 8: Result := '8-Bit'; 16: Result := '16-Bit'; 24: Result := '24-Bit'; 32: Result := '32-Bit'; end

; ReleaseDC(0, DesktopDC); end

; procedure

TForm1.Button1Click(Sender: TObject); begin

ShowMessage(GetColorDepth); end

;

Другое по теме:

Категории

Статьи

Советы

Copyright © 2023 - All Rights Reserved - www.delphirus.com