Hey,
ist es möglich eine Bitmap weichzuzeichen/unscharf zu machen und/oder zu verdunkeln (das glaube ich müsste anhand der Farbwerte gehen, weiß nur leider nich wie)?
Gruß Andy
Hey,
ist es möglich eine Bitmap weichzuzeichen/unscharf zu machen und/oder zu verdunkeln (das glaube ich müsste anhand der Farbwerte gehen, weiß nur leider nich wie)?
Gruß Andy
Schaue dir mal GDIP.au3 an! Dort kannst du sowas machen! -> http://www.autoitscript.com/forum/index.php?showtopic=106021 (nette Beispiele)!
Gruß,
UEZ
Erstmal dank Dir UEZ, da sind tolle Beispiele dabei...
Also Verdunkeln,Sättigen usw. is möglich, aber hab die GDIP.au3 mal nach "blur" durchsucht; da findet sich leider nichts...
Zu schade, weil das das wichtigste ist. Dann werd ich wohl oder übel darauf verzichten müssen, wenns keine Lösung gibt
Dennoch danke für die fixe Antwort, und vllt gibts ja doch noch ne Möglichkeit, die hier jemand weiß
Blur hast du anscheinend übersehen -> http://www.autoitscript.com/forum/index.php?showtopic=106021&view=findpost&p=751400
Gruß,
UEZ
Tatsache
Nochmals danke und dann will ich mich mal ranmachen das gebacken zu bekommen...
Gruß
Oh oh ich hab doch noch Probleme
Mir scheint, dies hier ist ein Beispiel zum Weichzeichnen...
Dort wird aber nicht "die normale" GDIPlus.dll geladen, sondern Version 1.1 (sieht man auch am Pfad im Win-Ordner)...
Und dann hab ich das hier gefunden (der post vom 28. Nov.); und im ersten link schreibt Authenticity das ja auch...
Heißt das, dass das garnicht klappen kann, wenn ich XP benutze?
Andy
Weichzeichnen könntest du evtl auch so erreichen.
Probier mal etwas mit diesen Funktionen rum:
_GDIPlus_GraphicsScaleTransform
_GDIPlus_GraphicsSetInterpolationMode
_GdiPlus_GraphicsSetSmoothingMode
euf ein temporäres Bitmap kleiner zeichnen und von dort wieder vergrößert auf das eigentliche Ziel zeichnen
hab ich nicht ausprobiert und verspreche keinen Erfolg
mfgE
Danke eukalyptus, noch hab ichs nich hinbekommen, aber werd mal etwas mit den genaunnten Funktionen rumprobieren...
Gruß Andy
zum Beispiel so:
#include <GDIPlus.au3>
#include "GDIP.au3"
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$sFile = FileOpenDialog("Öffnen", "", "(*.jpg;*.bmp;*.png;*.tif)")
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile($sFile)
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
$hGui = GUICreate("Test", $iWidth, $iHeight)
GUISetOnEvent($GUI_EVENT_CLOSE, "_EXIT")
GUISetState()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
$hBitmap = _Blur($hImage, 0.2)
$bBlur = True
While 1
Switch $bBlur
Case True
_GDIPlus_GraphicsDrawImage($hGraphics, $hImage, 0, 0)
$bBlur = False
Case Else
_GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0)
$bBlur = True
EndSwitch
Sleep(500)
WEnd
Func _Blur($hBitmap, $fScale = 0.2)
Local $iW = _GDIPlus_ImageGetWidth($hBitmap)
Local $iH = _GDIPlus_ImageGetHeight($hBitmap)
Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND(_WinAPI_GetDesktopWindow())
Local $hBmpSmall = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
Local $hGfxSmall = _GDIPlus_ImageGetGraphicsContext($hBmpSmall)
_GDIPlus_GraphicsSetSmoothingMode($hGfxSmall, 2)
Local $hBmpBig = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
Local $hGfxBig = _GDIPlus_ImageGetGraphicsContext($hBmpBig)
_GDIPlus_GraphicsSetSmoothingMode($hGfxBig, 2)
_GDIPlus_GraphicsScaleTransform($hGfxSmall, $fScale, $fScale)
_GDIPlus_GraphicsSetInterpolationMode($hGfxSmall, 2)
_GDIPlus_GraphicsScaleTransform($hGfxBig, 1 / $fScale, 1 / $fScale)
_GDIPlus_GraphicsSetInterpolationMode($hGfxBig, 2)
_GDIPlus_GraphicsDrawImage($hGfxSmall, $hBitmap, 0, 0)
_GDIPlus_GraphicsDrawImage($hGfxBig, $hBmpSmall, 0, 0)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hBmpSmall)
_GDIPlus_GraphicsDispose($hGfxSmall)
_GDIPlus_GraphicsDispose($hGfxBig)
Return $hBmpBig
EndFunc ;==>_Blur
Func _Exit()
_GDIPlus_BitmapDispose($hImage)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
mfgE