Source / code snippets | | | | Andreas Miethe
| a have I yet for this year.
screen eingrauen, How at XP-Abmelde-dialog. CompileMarkSeparation $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='./../../Function-References/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 : [...] | 12/28/09 ▲ |
| |
| | | nice! it has me whom day vergraut. |
| | | | |
| | ByteAttack | have whom effect only with the ProSpeed hinbekommen! Very beautiful |
| | | | |
| | | or manually: [...]
Ergraut whom screen stretched on 2 sec, can itself naturally yet optimize/speed. |
| | | | |
| | Andreas Miethe
| speed can it too so CompileMarkSeparation $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='./../../Function-References/XProfan/end/'>end
the Beauty on SetColorAdjustment() is, that one too gamma-values,Kontraste, brightness etc. very quick manipulating can |
| | | 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 : [...] | 12/29/09 ▲ |
| |
| | | with "Beschleunigen" meant I sooner, whom unperformanten code the Nproc "optimieren". ^^
but so many SetColorAdjustment-example rouse the marrow.
How do I get really again of a HPic one DC on the then too z.B. SetPixel(dc,... works? |
| | | | |
| | Frank Abbing | DC with SelectObject() tether. |
| | | | |
| | | | | | | |
| | | I get with AlphaBlend simply none Nichtabsturz there, what make I here wrong? CompileMarkSeparation $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
| 12/30/09 ▲ | |
| |
| | Frank Abbing | | | | | |
| | | I übergeb still The address of a Long, but Why obiges crashes, no idea... get You it To walk? |
| | | | |
| | Frank Abbing | Übergib one LongInt, no address. In my example wären it:
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 QuelltextTopic-Options | 25.277 Views |
Themeninformationenthis Topic has 6 subscriber: |