Fuente/ Codesnippets | | | |  Andreas Miethe
 | Einen Todavía para dieses Jahr.
Bildschirm eingrauen, como beim XP-Abmelde-Diálogo. KompilierenMarcaSeparación $H Windows.ph
Importdll("GDI32.DLL","")
struct COLORADJUSTMENT =
caSize%,
caFlag%,
caIlluminantIndex%,
caRedGamma%,
caGreenGamma%,
caBlueGamma%,
caReferenceBlack%,
caReferenceWhite%,
caContrast%,
caBrightness%,
caColorfulness%,
caRedGreenTint%
Proc FadetoGray
windowstyle $F0
Var CA# = New(COLORADJUSTMENT)
Bild anlegen
Var Pic& = Create("hNewPic",%maxx,%maxy,0)
Var DC& = ~CreateCompatibleDC(%hdc)
Ausgangsbild anlegen
Var Pic1& = Create("hNewPic",%maxx,%maxy,0)
Var DC1& = ~CreateCompatibleDC(%hdc)
DC vom Desktop
Var DC2& = ~CreateDC("DISPLAY",0,0,0)
Bilder ins DC
~SelectObject(DC&,PIC&)
~SelectObject(DC1&,PIC1&)
Vom Desktop ins Ausgangsbild
dient nur dazu ein Bild zu haben !
StretchBlt(DC1&,0,0,%maxx,%maxy,DC2&,0,0,%maxx,%maxy,~SRCCOPY | $40000000)
Window 0,0-%maxx,%maxy
ColorAdjustment holen
GetColorAdjustment(%hdc2,CA#)
Blittmode auf HALFTONE setzen
SetStretchBltMode(%hdc2,4)
Full Color auf Werte zwischen -100 und 100
whileLoop CA#.caColorfulness%,-100,-8
CA#.caColorfulness% = &Loop Grautöne
ColorAdjustment setzen
SetColorAdjustment(%hdc2,CA#)
StretchBlt(%hdc2,0,0,%maxx,%maxy,DC1&,0,0,%maxx,%maxy,~SRCCOPY)
DrawsizedPic Pic&,0,0-%maxx,%maxy;0
Repaint
endwhile
Bilder freigeben
~DeleteDC(DC&)
~DeleteDC(DC1&)
~DeleteDC(DC2&)
~DeleteObject(Pic&)
~DeleteObject(Pic1&)
Dispose CA#
EndProc
FadeToGray()
waitinput 10000
s4 href='./../../funktionsreferenzen/XProfan/end/'>end
|
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 28.12.2009 ▲ |
| |
| |  | Nett! Lo ha me el Tag vergraut.  |
| | | | |
| |  ByteAttack | Pida a los Effekt sólo el ProSpeed hinbekommen! Sehr schön  |
| | | | |
| |  | Oder manuell: [...] 
Ergraut el Bildschirm gestreckt en 2 Sekunden, lässt se natürlich todavía optimieren/beschleunigen. |
| | | | |
| |  Andreas Miethe
 | Beschleunigen puede ser lo auch así KompilierenMarcaSeparación $H Windows.ph
Importdll("GDI32.DLL","")
struct COLORADJUSTMENT =
caSize%,
caFlag%,
caIlluminantIndex%,
caRedGamma%,
caGreenGamma%,
caBlueGamma%,
caReferenceBlack%,
caReferenceWhite%,
caContrast%,
caBrightness%,
caColorfulness%,
caRedGreenTint%
Proc FadetoGray
windowstyle $F0
Var CA# = New(COLORADJUSTMENT)
Bild anlegen
Var Pic& = Create("hNewPic",%maxx,%maxy,0)
Var DC& = ~CreateCompatibleDC(%hdc)
Ausgangsbild anlegen
Var Pic1& = Create("hNewPic",%maxx,%maxy,0)
Var DC1& = ~CreateCompatibleDC(%hdc)
DC vom Desktop
Var DC2& = ~CreateDC("DISPLAY",0,0,0)~GetDC(GetDesktop())
Bilder ins DC
~SelectObject(DC&,PIC&)
~SelectObject(DC1&,PIC1&)
Vom Desktop ins Ausgangsbild
dient nur dazu ein Bild zu haben !
StretchBlt(DC1&,0,0,%maxx,%maxy,DC2&,0,0,%maxx,%maxy,~SRCCOPY | $40000000)
Window 0,0-0,0
StretchBlt(%hdc2,0,0,%maxx,%maxy,DC1&,0,0,%maxx,%maxy,~SRCCOPY)
Repaint
~Movewindow(%hwnd,0,0,%maxx,%maxy,1)
ColorAdjustment holen
GetColorAdjustment(%hdc2,CA#)
Blittmode auf HALFTONE setzen
SetStretchBltMode(%hdc2,4)
Full Color auf Werte zwischen -100 und 100
CA#.caColorfulness% = -100 Grautöne
ColorAdjustment setzen
SetColorAdjustment(%hdc2,CA#)
StretchBlt(%hdc2,0,0,%maxx,%maxy,DC1&,0,0,%maxx,%maxy,~SRCCOPY)
Repaint
Bilder freigeben
~DeleteDC(DC&)
~DeleteDC(DC1&)
~DeleteDC(DC2&)
~DeleteObject(Pic&)
~DeleteObject(Pic1&)
Dispose CA#
EndProc
FadeToGray()
waitinput 10000
ref='./../../funktionsreferenzen/XProfan/end/'>end
Das Schöne a SetColorAdjustment() es, dass uno auch Gamma-Werte,Kontraste, Helligkeit usw. muy rápidamente manipulieren kann  |
| | | Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...]  | 29.12.2009 ▲ |
| |
| |  | Mit "Beschleunigen" meinte Yo más, el unperformanten Code el NProc "optimieren". ^ ^
Aber así viele SetColorAdjustment-Ejemplo erwecken el Herz. 
Como bekomme Yo eigentlich otra vez de una HPic una DC en el entonces auch z.B. SetPixel(dc,... klappt? |
| | | | |
| |  Frank Abbing | DC con Seleccionar objeto() anbinden. |
| | | | |
| |  | | | | | |
| |  | Yo bekomme con AlphaBlend simplemente no Nichtabsturz hin, qué mache Yo hier falso?  KompilierenMarcaSeparación $H Windows.ph
cls
Var bm1& = ~CreateBitmap(256,256,1,32,0)
Var DC1& = ~CreateCompatibleDC(0)
~SelectObject(DC1&,bm1&)
Var bm2& = ~CreateBitmap(256,256,1,32,0)
Var DC2& = ~CreateCompatibleDC(0)
~SelectObject(DC2&,bm2&)
~bitblt(%hDc,0,0,256,256,dc1&,0,0,~SRCCOPY)
var bf&=255 * $10000 | $1000000
waitinput
~AlphaBlend(%hdc,0,0,128,128,dc1&,0,0,128,128,addr(bf&))
waitinput
| | 30.12.2009 ▲ |
| |
| |  Frank Abbing | | | | | |
| |  | Yo übergeb doch el Adresse de una Largo, aber por qué obiges accidentes, ni idea... bekommst Usted lo a laufen? |
| | | | |
| |  Frank Abbing | Übergib una LongInt, no Adresse. In mi Ejemplo wären lo:
ftn.BlendOp,0 ftn.BlendFlags,0 ftn.SourceConstantAlpha,128 ;Transparenz 0/255 ftn.AlphaFormat,0
=
0 128 0 0
=
00000000 10000000 00000000 00000000
=
%00000000100000000000000000000000
 |
| | | | |
|
Zum QuelltextTema opciones | 26.000 Views |
ThemeninformationenDieses Thema ha 6 subscriber: |