Autor Beitrag
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Fr 06.05.05 10:43 
Hi,

kann ich eigentlich das vierte Byte eines Pixels bei Pixelformat=pf32bit getrost zum Speichern eines Alphakanals missbrauchen oder pfuscht mir Delphi/Windows bei manchen Operationen ungewollt drin herum?
Muetze1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 346



BeitragVerfasst: Fr 06.05.05 11:55 
Moin!

Hängt ganz davon ab - z.B. nutzen manche Windows Funktionen das 4. Byte - z.T. auch als Alphawert (siehe AlphaBlend()). Und Sicherheiten gibt es nunmal nicht - vor allem da die meisten GDI Funktionen durch die Grafikkartentreiber durch optimierte ersetzt werden, die die gleichen Operationen das vielleicht in Hardware ausführen, etc. Daher hast nie eine Sicherheit.

MfG
Muetze1

_________________
49 63 68 68 61 62 65 6B 65 69 6E 65 41 68 6E 75 6E 67 21
Spaceguide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Fr 06.05.05 12:05 
Ist denn TBitmap geräteabhängig oder doch ein DIB?
Muetze1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 346



BeitragVerfasst: Fr 06.05.05 12:58 
Moin!

user profile iconSpaceguide hat folgendes geschrieben:
Ist denn TBitmap geräteabhängig oder doch ein DIB?


Eine PixelFormat Angabe mit direkter Bitzahl ist immer ein DIB. Ein DDB hat im Normalfall ein PixelFormat von pfCustom oder pfDevice.

Das kannst du sonst auch mit der Eigenschaft HandleType überprüfen...

MfG
Muetze1

_________________
49 63 68 68 61 62 65 6B 65 69 6E 65 41 68 6E 75 6E 67 21