Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi [DelphiX] Zeichnen mit Transparenz (https://www.delphipraxis.net/73212-%5Bdelphix%5D-zeichnen-mit-transparenz.html)

Flogo 28. Jul 2006 09:54

Re: [DelphiX] Zeichnen mit Transparenz
 
Hi ijcro,
could you give a quick explanation on how to get the alphachannel in the DIB? I tried it with Photoshop (new file -> background = transparent -> a few lines with the brush -> save as -> dib) but it just didnt save the alphachannel.
Well maybe it did, but there was no transparence while drawing on the DXDraw surface.
Is it possible to use the Sprite/ImageSprite classes just as before by changing the Image from a "foo.bmp" to a "foo.dib" or do you have to change something else?

[edit]

I just tried to load the image with this TDIB component and called
Delphi-Quellcode:
  DXDraw.Surface.LoadFromDIB(DIB.AlphaChannel);
I saw the Alphachannel, so it must have been saved. But there is still no sign of the Alphachannel when I draw the picture as a Sprite..

[/edit]

ijcro 8. Sep 2006 15:07

Re: [DelphiX] Zeichnen mit Transparenz
 
Helper exists and with it you can put DIB8 into alphachanel (or get out), please see into source in DIB units.

Flogo 9. Sep 2006 09:39

Re: [DelphiX] Zeichnen mit Transparenz
 
Do I have to Draw the DIB manualy or can I just go on drawing the ImageSprite with the DXSpriteEngine?

ijcro 10. Sep 2006 14:23

Re: [DelphiX] Zeichnen mit Transparenz
 
Aha, you is using DXSpriteEngine yet...
Whe you is using "new look" of DXSpriteEngine, you can use HW acceleration a picture with alpha channel, stored in DXImageList. When you prepare picture in other program in way joint DIB24 R8G8B8 and DIB8 A8 with function DIB32.AssignAlphaChannel(DIB8), no more. Please see to function HasAlphaChannel and property AlphaChannel in TDIB class too.

ijcro 14. Sep 2006 10:54

Re: [DelphiX] Zeichnen mit Transparenz
 
Eh sorry, my English is worst than ever

:gruebel:

SirThornberry 14. Sep 2006 11:49

Re: [DelphiX] Zeichnen mit Transparenz
 
Zitat:

Zitat von ijcro
Eh sorry, my English is worst than ever

:gruebel:

Wo liegt dein jetziges Problem? ein Bitmap mit 32bit zu erzeugen wo der 4te Kanal der Alphakanal ist? wenn dem so ist könnt ich dir ein Programm zukommen lassen

ijcro 14. Sep 2006 19:16

Re: [DelphiX] Zeichnen mit Transparenz
 
Well, you can send there code for test...


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:12 Uhr.
Seite 2 von 2     12   

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