English
Source / code snippets

Fadetogray

 

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.
 
12/28/09  
 




ByteAttack
have whom effect only with the ProSpeed hinbekommen!
Very beautiful
 
Website:  [...] 
Facebook:  [...] 
12/29/09  
 



or manually: [...] 

Ergraut whom screen stretched on 2 sec, can itself naturally yet optimize/speed.

322 kB
Hochgeladen:12/29/09
Downloadcounter143
Download
 
12/29/09  
 




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?
 
12/29/09  
 




Frank
Abbing
DC with SelectObject() tether.
 
12/29/09  
 



Ah, thanks!
 
12/30/09  
 



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
The latest Parameter is a structure:
CompileMarkSeparation
the are 4 byte, You can means simply one LongInt transfer.

[...] 
 
12/30/09  
 



I übergeb still The address of a Long, but Why obiges crashes, no idea... get You it To walk?
 
12/30/09  
 




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

 
12/30/09  
 




Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

25.278 Views

Untitledvor 0 min.
RudiB.04/22/21
Stefan8103/15/21
N.Art11/18/20
p.specht10/19/20
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie