Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi bitmap.pixelformat ausgeben (https://www.delphipraxis.net/59462-bitmap-pixelformat-ausgeben.html)

meisteralex 22. Dez 2005 18:40


bitmap.pixelformat ausgeben
 
Sorry, wahrscheinlich blöde Frage aber ich finds nicht *g*

Wie kann ich mir das Pixelformat einer geladenen Bitmap ausgeben lassen ??
also quasi showmessage(bit.pixelformat), oder besser gesagt die umwandlung von pixelforma zu string??

ichbins 22. Dez 2005 19:03

Re: bitmap.pixelformat ausgeben
 
schreib dir doch ne Funktion:
Delphi-Quellcode:
function pixelformattostring(pf:tpixelformat);
begin
  case pf of
    pf1bit: result:='1 Bit';
    pf8bit: result:='8 Bit';
  else
    result:='Pixelformat nicht gefunden';
  end;
end;
nicht getestet

Khabarakh 22. Dez 2005 19:04

Re: bitmap.pixelformat ausgeben
 
Ein Weg wäre natürlich über case, ein anderer, etwas generischerer (was für ein Wort :stupid: ):
Delphi-Quellcode:
ShowMessage(GetEnumName(TypeInfo(TPixelFormat), Integer(Bitmap.PixelFormat)));


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz