| |
|
|
Andreas Miethe
| Per SetColorAdjustment can nice effects with pictures without plenty hoisted release ! so goes z.B. the Überblenden of colour to gray How at Neustart-dialog Windows, or the Invisible to Black etc. here an example, How one Graustufen-Images produce can. CompileMarkSeparation $H Windows.ph
Importdll("GDI32.DLL","")
struct COLORADJUSTMENT =
caSize%,
caFlag%,
caIlluminantIndex%,
caRedGamma%,
caGreenGamma%,
caBlueGamma%,
caReferenceBlack%,
caReferenceWhite%,
caContrast%,
caBrightness%,
caColorfulness%,
caRedGreenTint%
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)
ColorAdjustment holen
GetColorAdjustment(DC&,CA#)
Blittmode auf HALFTONE setzen
SetStretchBltMode(DC&,4)
Full Color auf Werte zwischen -100 und 100
CA#.caColorfulness% = -100 Grautöne
ColorAdjustment setzen
SetColorAdjustment(DC&,CA#)
Vom Ausgangsbild ins Bild
StretchBlt(DC&,0,0,%maxx,%maxy,DC1&,0,0,%maxx,%maxy,~SRCCOPY)
DCs freigeben
~DeleteDC(DC&)
~DeleteDC(DC1&)
~DeleteDC(DC2&)
Bild Speichern
SavePic "1.png",Pic&
Bilder freigeben
~DeleteObject(Pic&)
~DeleteObject(Pic1&)
Dispose CA#
Anzeigen
ShellExec("1.png","open",1)
./../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/13/09 ▲ |
|
|
|
|
Frank Abbing | class API! Kannte I none. |
|
|
| |
|
|
|
p.specht
| Fehlende characters complement:
$H windows.ph
Importdll("GDI32.DLL","")
struct COLORADJUSTMENT = \
caSize%,\
caFlag%,\
caIlluminantIndex%,\
caRedGamma%,\
caGreenGamma%,\
caBlueGamma%,\
caReferenceBlack%,\
caReferenceWhite%,\
caContrast%,\
caBrightness%,\
caColorfulness%,\
caRedGreenTint%
Var CA# = New(COLORADJUSTMENT)
'Image lay out
Var Pic& = Create("hNewPic",%maxx,%maxy,0)
Var DC& = ~CreateCompatibleDC(%hdc)
'Ausgangsbild lay out
Var Pic1& = Create("hNewPic",%maxx,%maxy,0)
Var DC1& = ~CreateCompatibleDC(%hdc)
'DC of Desktop
Var DC2& = ~CreateDC("DISPLAY",0,0,0)
'Images in that DC
~SelectObject(DC&,PIC&)
~SelectObject(DC1&,PIC1&)
'of Desktop in that Ausgangsbild
'serves only to a Image to have !
StretchBlt(DC1&,0,0,%maxx,%maxy,DC2&,0,0,%maxx,%maxy,~SRCCOPY | $40000000)
'ColorAdjustment fetch
GetColorAdjustment(DC&,CA#)
'Blittmode on HALFTONE settle
SetStretchBltMode(DC&,4)
'Full Color on values between -100 and 100
CA#.caColorfulness% = -100'Grautöne
'ColorAdjustment settle
SetColorAdjustment(DC&,CA#)
'of Ausgangsbild in that Image
StretchBlt(DC&,0,0,%maxx,%maxy,DC1&,0,0,%maxx,%maxy,~SRCCOPY)
'DCs enable
~DeleteDC(DC&)
~DeleteDC(DC1&)
~DeleteDC(DC2&)
'Save picture
SavePic "1.png",Pic&
'Images enable
~DeleteObject(Pic&)
~DeleteObject(Pic1&)
Dispose CA#
'Show
ShellExec("1.png","open",1)
end
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 02/18/19 ▲ |
|
|
|