Mh da blick ich überhaupt nicht mehr durch wie man davon nun die 1/8 bekommt :s
Beiträge von Greek
-
-
x^2 + 8px = 0
mh
Dann wär das Quadratische Ergänzungsglied aber 8/2 oder? Versteh die Aufgabe nicht so ganz.
Von 1/4 die Hälfte ist ja 1/8 , deswegen dachte ich muss das aufjedenfall 1/4 dabei sein.
-
Hiho,
hab hier eine Matheaufgabe bei der ich mir nicht ganz sicher bin:
" Wie lautet die Quadratische Gleichung in der Normalform, wenn das quadratische Ergänzungsglied ( 1/8 ) ist und kein konstantes Glied vorhanden ist? "
Ich würde sagen:
x² + 1/4x = 0
Könnte das stimmen?
Schonmal Danke und Gruss Greek

-
Alles gute Progandy

-
Das müsste so stimmen, hab es auch gerade ausprobiert. Die verhindern wohl das man das auslesen kann, was ja auch eigentlich gut so ist...
-
Funkey hat ne coole Funktion dazu geschrieben, geh einfachmal auf Author Funkey Begriff bilder in der Suche.
Hier ein Beispiel:
Zu großes Script um es hier zu posten

Geh einfach auf Raw und drück Strg + A, dann hast du es.Wenn du das Script ausführst siehst du ein lustiges Bild^^
-
Hm, die UDF von mir ist schon alt, die geht glaubich nicht mal unter Vista, kann das nicht ausprobieren.
Du kannst es so machen:
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <StaticConstants.au3>
#include <WindowsConstants.au3>$Form1 = GUICreate("Transparent", 601, 201, 193, 125, $WS_POPUP+$WS_THICKFRAME, $WS_EX_LAYERED)
[/autoit] [autoit][/autoit] [autoit]
$Pic1 = GUICtrlCreatePic("trans.JPG", 0, 0, 600, 200, BitOR($SS_NOTIFY,$WS_CLIPSIBLINGS))
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlCreateLabel("", 0, 0, 50, 50, -1, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetResizing(-1, $GUI_DOCKSIZE)
GUICtrlSetBkColor(-1, 0x00FF00)
GUICtrlSetState(-1, $GUI_ONTOP)
GUISetState(@SW_SHOW)While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEndBrauch das Bild hier noch ( als trans.JPG speichern )
[Blockierte Grafik: http://img408.imageshack.us/img408/125/transa.jpg]
-
[autoit]Nebenbei: Auch mit den Timer Funktionen, hatte ich keine hohe CPU-Last.
$msg = GUIGetMsg()
[/autoit][autoit][/autoit][autoit]Switch $msg
[/autoit]
Case -3
Exit
EndSwitchDiese paar Zeilen sorgen schon dafür das die CPU Auslastung gering bleibt. Die Regelt das automatisch mit dem Sleep.
-
[autoit]
$timerstart = TimerInit()
[/autoit]Muss man schon vor die Schleife setzen, sonst hats ja keinen Sinn.
-
Das geht nicht, du kannst höchstens so probieren:
[autoit]Func SetPixel ($handle, $x, $y, $color)
[/autoit]
$dc= DllCall ("user32.dll", "int", "GetDC", "hwnd", $handle)
$setpixel= DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
$realesedc= DllCall ("user32.dll", "int", "ReleaseDC", "hwnd", 0, "int", $dc[0])
EndFuncDamit musst du dir deine Uhr dann malen, aber das malt zu langsam, es wird extrem Flackern, wenn man es überhaupt noch sieht.
Man muss in den Frame zeichnen, damit das ordentlich dargestellt wird. ( Ist aber zu schwer das umzusetzen )
-
So geht das:
Spoiler anzeigen
[autoit]; Kompiliere dieses Skript zu "ConsoleRead.exe".
[/autoit] [autoit][/autoit] [autoit]
; Öffne ein Konsolenfenster und wechsle in das Verzeichnis, in dem ConsoleRead.exe ist.
; Tippt folgendes in die Befehlszeile:
; dir foo.bar | ConsoleRead.exe
;
; Wenn obige Zeile in einem Konsolenfenster aufgerufen wird, gibt der echo Befehl den Text
; "Hallo!" aus. Anstatt diesen anzuzeigen, bewirkt das "|" in dem Befehl, das der Text
; An den STDIN Stream des ConsoleRead.exe Prozesses weitergeleitet wird.
If Not @Compiled Then
MsgBox (0, "", "Dieses Skript muss kompiliert sein, um seine Funktionalität zu demonstrieren.")
Exit -1
EndIfLocal $data
[/autoit]
While True
$data &= ConsoleRead ( )
If @error Then ExitLoop
Sleep (25)
WEnd
MsgBox (0, "", "Erhalten: " & @CRLF & @CRLF & $data)Aber da muss man im CMD auch sagen das er es an ConsoleRead.exe senden soll, mit | ConsoleRead.exe am Ende dran hängen.
-
Warum machst du für das richtige Return einen SetError?
Die hat Prog@ndy gemacht und nicht ich.
( Steht ja auch dran )
Edit:
Das SetError hat ja in diesem Fall auch ein Return, weil der 3 Parameter beim SetError angegeben ist. Steht genauer in der Hilfe.
-
[autoit]
Func _GDIPlus_GetPixel($hBitmap,$X,$Y)
[/autoit]
; Prog@ndy
Local $result = DllCall($ghGDIPDLL, "int", "GdipBitmapGetPixel", "ptr", $hBitmap, "int", $X, "int", $Y, "dword*", 0)
If @error Then Return SetError(1,0,0)
Return SetError($result[0],1,$result[4])
EndFunc
Func _GDIPlus_SetPixel($hBitmap,$X,$Y, $ARGB)
; Prog@ndy
Local $result = DllCall($ghGDIPDLL, "int", "GdipBitmapSetPixel", "ptr", $hBitmap, "int", $X, "int", $Y, "dword", $ARGB)
If @error Then Return SetError(1,0,0)
Return SetError($result[0],1,$result[0]=0)
EndFunc
? -
Jetzt ist das weiße Viereck (GUI) schwarz. Muss ich irgendeine spezielle Version von irgendwas haben ? Gut ausgedrückt, nicht wahr.
Bei mir wirds richtig dargestellt, die Icons.au3 haste ja runtergeladen?
Mh, wenn du bei dir noch nen schwarzes GUI hast probiers mal so:
[autoit]#include <GUIConstantsEx.au3>
[/autoit][autoit][/autoit][autoit]
#include <WindowsConstants.au3>
#include <icons.au3>$MainGUI = GUICreate("Transparent", 340, 340, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
GUISetBkColor(0x000000)
$baseketball = GUICtrlCreatePic("", 0, 0, 340, 340)
_SetImage($baseketball, @ScriptDir&"\ball.png")
_WinAPI_SetLayeredWindowAttributes($MainGUI,0x000000,255)
GUISetState(@SW_SHOW)While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd -
[autoit]
#include <GUIConstantsEx.au3>
[/autoit][autoit][/autoit][autoit]
#include <WindowsConstants.au3>
#include <icons.au3>$MainGUI = GUICreate("Transparent", 340, 340, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
GUISetBkColor(0x000000)
$baseketball = GUICtrlCreatePic("", 0, 0, 340, 340)
_SetImage($baseketball, @ScriptDir&"\ball.png")
GUISetState(@SW_SHOW)While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd -
Liegt daran das es doppelt gepuffert ist, ohne geht es:
Spoiler anzeigen
[autoit]#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Misc.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>HotKeySet("{ESC}", "_Shut")
[/autoit] [autoit][/autoit] [autoit]
Opt("GUIOnEventMode", 1)$hGui = GUICreate("GDI+", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_LAYERED)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUISetBkColor(0x000000)
_WinAPI_SetLayeredWindowAttributes($hGui,0x000000,255)
GUISetOnEvent(-3, "_Shut")
GUISetState()_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics(@DesktopWidth, @DesktopHeight, $hGraphics)
Global $Backbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
Global $hPen = _GDIPlus_PenCreate(0xFFFF0000, 2)_GDIPlus_GraphicsClear($Backbuffer)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Sleep(300)While 1
[/autoit] [autoit][/autoit] [autoit]
$pos = MouseGetPos()
While _IsPressed("01")
$pos2 = MouseGetPos()
_GDIPlus_GraphicsClear($hGraphics)
_GDIPlus_GraphicsDrawLine($hGraphics, $pos[0], $pos[1], $pos2[0], $pos[1], $hPen);Oben horizontal
_GDIPlus_GraphicsDrawLine($hGraphics, $pos[0], $pos[1], $pos[0], $pos2[1], $hPen);Links vertikal
_GDIPlus_GraphicsDrawLine($hGraphics, $pos2[0], $pos[1], $pos2[0], $pos2[1], $hPen);Rechts vertikal
_GDIPlus_GraphicsDrawLine($hGraphics, $pos[0], $pos2[1], $pos2[0], $pos2[1], $hPen);Unten horizontal
;~ _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
WEnd
_GDIPlus_GraphicsClear($hGraphics, 0xFF000000)
Sleep(10)
WEndFunc _Shut()
[/autoit]
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_GraphicsDispose($Backbuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_PenCreate($hPen)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Shut -
Oh ha. Die 20ms bei AdlibRegister sind aber riskant. Mein alter BüroPC (Athlon XP 2600 @1,9 GHZ) schafft das nichmehr.
Bei 40ms läufts und schaut gut aus.
edit \ Am besten ab in die Schleife mit der Funktion oder?
Mit 20ms stürzt das Script einfach ab bei mir 21:09:28 AutoIT3.exe ended.rc:1073807364
Mit 40ms läuft es.
Dabei hab ich gar keinen schlechten PC.
-
Hiho,
ich benutz immer Dll Exports Viewer, mit AutoIt erstellt worden, der ist richtig gut

Datei im Anhang.Gruss Greek
-
Hiho,
Raupi :
Wenn ich das benutz ist mein Bild danach schwarz

Habs mal mit FreeImage:
Spoiler anzeigen
[autoit]#include <FreeImage.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <GDIPlus.au3>#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Bild des Monats | Umbenenner (All to .jpg)", 431, 205)
GUISetBkColor(0xA0A0A4)
$Input1 = GUICtrlCreateInput("", 8, 24, 305, 21)
$hBtn_Search = GUICtrlCreateButton("Durchsuchen", 320, 22, 97, 25)
$Label1 = GUICtrlCreateLabel("Bild wählen", 8, 8, 58, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Progress1 = GUICtrlCreateProgress(64, 120, 305, 9)
$Label2 = GUICtrlCreateLabel("Status..:", 16, 120, 43, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Label4 = GUICtrlCreateLabel("Größe änderen", 16, 144, 75, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$Inp_X = GUICtrlCreateInput("1024", 104, 136, 33, 21)
$Label5 = GUICtrlCreateLabel("X", 144, 137, 15, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
$Inp_Y = GUICtrlCreateInput("1024", 168, 136, 33, 21)
$Label6 = GUICtrlCreateLabel("Pixel", 208, 137, 36, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFFFF)
$hBtn_Rename = GUICtrlCreateButton("Nur Konvertieren", 144, 168, 91, 25)
$hBtn_Resize = GUICtrlCreateButton("Größe ändern", 240, 168, 107, 25)
$Input2 = GUICtrlCreateInput("", 8, 88, 313, 21)
$hBtn_Search2 = GUICtrlCreateButton("Durchsuchen", 328, 85, 75, 25)
$Label7 = GUICtrlCreateLabel("Speicherort", 8, 64, 58, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###_FreeImage_LoadDLL(@ScriptDir&"\FreeImage.dll")
[/autoit] [autoit][/autoit] [autoit]
_FreeImage_Initialise()While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $hBtn_Search
$szPath = FileOpenDialog("Bild öffnen", "", "Bilder (*.jpg;*.bmp;*.png)", 3) ; Datei auswählen
If Not @error Then
GUICtrlSetData($Input1, $szPath)
$szPath = StringReplace($szPath, StringTrimLeft($szPath, StringInStr($szPath, ".", "", -1) ), "jpg")
GUICtrlSetData($Input2, $szPath)
EndIfCase $hBtn_Search2
[/autoit] [autoit][/autoit] [autoit]
$szPath = FileOpenDialog("Speichern unter", "", "JPG-Bild (*.jpg)", 3) ; Datei auswählen
If Not @error Then GUICtrlSetData($Input2, $szPath)Case $hBtn_Resize
[/autoit] [autoit][/autoit] [autoit]
$sFile = GUICtrlRead($Input1)
$FIF = _FreeImage_GetFileTypeU($sFile)
If $FIF = $FIF_UNKNOWN Then
$FIF = _FreeImage_GetFIFFromFilenameU($sFile)
EndIf
$hImage = _FreeImage_LoadU($FIF, $sFile);~ $hImageRotiert = _FreeImage_RotateClassic($hImage,270); Kannste auch machen
[/autoit] [autoit][/autoit] [autoit]
$hImageResized = _FreeImage_Rescale($hImage, GUICtrlRead($Inp_X), GUICtrlRead($Inp_Y), $FILTER_LANCZOS3)
$dot = StringInStr($sFile,".",1,-1)
$Name = StringLeft($sFile,$dot-1)
$Ext = StringMid($sFile,$dot)_FreeImage_SaveU($FIF, $hImageResized, GUICtrlRead($Input2) ) ; $Name &"_rsz"&$Ext
[/autoit] [autoit][/autoit] [autoit]
_FreeImage_Unload($hImage)
_FreeImage_Unload($hImageResized)Case $hBtn_Rename
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]
If Not FileExists(GUICtrlRead($Input1)) Then ContinueLoop
$hImage = _GDIPlus_ImageLoadFromFile(GUICtrlRead($Input1))
If @error Then ContinueLoop_GDIPlus_ImageSaveToFile($hImage, GUICtrlRead($Input2))
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_Shutdown()
EndSwitch
WEnd_FreeImage_DeInitialise()
[/autoit]Hier bekommst du FreeImage.
Gruss Greek
-
Alles Gute UEZ
