Jump to content

Search the Community

Showing results for tags 'gdiplus'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






  1. This is a project that I have been working on for several months off and on. It's a simple "What You Hear" MP3 @ 320Kbps and WAV audio recorder. Features: - LoudMax, a Gain Controller and Look-Ahead Limiter - Auto Shut-Off after one minute of silence - Side-by-Side Simulated LED Meter - Running Time Counter It started off being a large project, but I eventually stripped it down to its bare essentials because I came to realize that it would be very difficult to deal with every sound card and every way a PC is set up for audio. It would have been a nightmare that
  2. I have been working on audio graphical scripts these last several months. This is my last script on this subject for now. On to other projects. Credits: UEZ, Eukalyptus, BrettF, Prog@ndy, Authenticity and the AutoIt Community. Thanks to all that made these scripts possible! Please let me know if you have any problems with it. Download: LIVE Stereo Audio Waveform v2.zip
  3. I have been playing with this script off and on for about a month - trying to get the needles to look more realistic. It's best to use with an audio limiter on the source audio, or else you'll be tweaking the input levels on every song. It should work with any version of AutoIt, starting with Please report any problems with it. Credits are in the script. Download: LIVE Analog Stereo Meter.au3
  4. How can you select the specific style of a font with multiple * .otf files? The font in question has several files: Thin Thin Italic Extra-Light Extra-Light Italic Light Light Italic Regular Regular Italic Medium Medium Italic Semi-Bold Semi-Bold Italic Bold Bold Italic Extra-Bold Extra-Bold Italic Black Black Italic But after doing several tests I can recall the font like this, without being able to specify the precise style: Local $hFamily = _GDIPlus_FontFamilyCrea
  5. I ran across a topic while researching the BASS UDF... https://www.autoitscript.com/forum/topic/155845-carpenter-needs-help-performing-serious-surgery-on-audiometer2/ and then remembered another topic... https://www.autoitscript.com/forum/topic/121624-sound-level-sampling/ which got me to thinking as to how I could get the first topic to go LIVE without the need of loading an mp3. This will accept any LIVE AUDIO INPUT. Be sure to read this post if you have trouble with it... https://www.autoitscript.com/forum/topic/121624-sound-level-sampling/?do=findComment&
  6. Hello folks, I've been working on a couple of GDI+ gauges, they need a bit of polish here and there I'd appreciate it if you guys/girls could play around and give me some suggestions. Cheers. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=Gauges With Sliders.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> #include <GDIplus.au3> #include <ColorConstants.au3> #include <Array.au3> Global Const $width = @DesktopWidth * 3 / 4 Global Const $height = @DesktopHeight Global
  7. I'm creating a tool which automatically saves screenshots. I've found that some images appear corrupt after saving. I've narrowed the source down to screenshots taken from within an RDP session via the Ctrl+Alt+Plus (PrtScn equivalent) and Ctrl+Alt+Minus (Alt+PrtScn equivalent) key combos. Here is the example code: #include <ClipBoard.au3> #include <GDIPlus.au3> If _ClipBoard_IsFormatAvailable($CF_BITMAP) Then ConsoleWrite("+Bitmap found on Clipboard" & @CRLF) If Not _ClipBoard_Open(0) Then MsgBox(16, "Error", "_Clip
  8. Here another example to mark the desktop to get the marked region for capturing. This example is not perfect and not very fast (room for improvements). ;Coded by UEZ build 2020-08-07 beta ;Code cleanup up mLipok ; ;Short instruction: mark area on your desktop and press return key to capture. #include <APISysConstants.au3> #include <Array.au3> ;#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIGdi.au3> #include <WinAPISysWin.au3> #include <WindowsConstants.au3> ; enum _PROCESS_DP
  9. I think that _GDIPlus_ImageGetPropertyItem should return a Property Item that can readily be set as a property of another image. Why would one want to do this? A script might (as one of mine does) edit an image of a .jpg file then write the result to a .jpg file. In editing it, in my case, the number of horizontal and vertical pixels change, and the date/time edited should be set as a property. All other property items remain the same. Other GDI+ users may change other properties. So an approach is to copy all the property items from image1 to image2, then update a few properties. M$
  10. Hi Community, I'm looking for a way to do a Video Overlay GUI or something like that. The idea is to create a GUI which plays a video loop (with transparency/alpha channel) in front of an other GUI. Before you asking why - because I don't believe that GDIPlus can do it out of the box. My skillset for that kind of graphical things isn't good enough to do that, but here are some specialist like @UEZ maybe who can help. Example alpha channel video (visualized as animated *.gif): I tried to do the light rays effect directly with GDIPlus, but honestly that's a bit too difficult
  11. I had thought that _GDIPlus_ImageClone($hImage) removes all property items, but I now know that it copies property items. What is the easiest way of copying an image that has property items to another image that does not have property items?
  12. I have a strange symptom of a problem somewhere in my code, or in a UDF: when I add code to get all properties of a GDI+ image to a 6000-line script, the variable type of a parameter is reported as a pointer when the caller clearly has this argument as a string. If I comment out my code that gets the properties, the function properly sees the parameter as a string. [Edit: The reporting as a pointer and getting image properties are miles apart, both in where they are in the script code and in where they are run.] At this point, I am looking for clues as to why this is happening, so t
  13. I find _GDIPlus_ImageClone in the Help, but neither in SciTe auto-complete nor in GDIPlus.au3 Shoud this be reported in Trac? By searching the forum (and changing the name of the first arguement ot DLLCall, the code appears to be: Func _GDIPlus_ImageClone($hImage) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipCloneImage", "handle", $hImage, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[2] EndFunc ;==>_GDIPlus_ImageClone
  14. Nothing special - just another analogue clock. -> Read https://en.wikipedia.org/wiki/Swiss_railway_clock for more information. Requires Windows7+ OS! Widget style GUI: ;The Hilfiker / MobaTime Swiss Railway Clock ;Coded by UEZ build 2019-07-07 ;Thanks to Eukalyptus for the _CreateBrushedAluminum() function! #pragma Compile(Icon, "GDI+ Swiss Railway Clock.ico") #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe /rm #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #AutoIt3Wrapper_
  15. The _ScreenCapture_CaptureWnd() logic may have an issue in v3.3.14.3. I was testing scripts using v3.3.14.3 and saw that the scripts' screen captures weren't getting created. I immediately ran the scripts using v3.3.14.2 and the screen captures were being created as expected. The _ScreenCapture_CaptureWnd() function, in v3.3.14.3, returns @error = -2. Can anyone else confirm that they are seeing the same issue? Below is a slightly modified version of the function's help file's _ScreenCapture_CaptureWnd() example that should allow you to recreate the issue. #include &
  16. #include <GDIPlus.au3> Text2PNG(@DesktopDir & "\MyPNG.png", 0x00FFFFFF) ; Transparent but bold ugly text ;Text2PNG(@DesktopDir & "\MyPNG.png", 0xFFFFFFFF) ; Nice Text but not transparent Func Text2PNG($sFile, $iColor) _GDIPlus_Startup() Local $hImage = _GDIPlus_BitmapCreateFromScan0(50, 25) Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsClear($hGraphics, $iColor) _GDIPlus_GraphicsDrawString($hGraphics, "Hello", 0, 0, "Arial", 12, 0) _GDIPlus_ImageSaveToFile($hImage, $sFile)
  17. $hImage = _GDIPlus_ImageLoadFromFile($aImageSave) $X1 = _GDIPlus_ImageGetWidth($hImage) $Y1 = _GDIPlus_ImageGetHeight($hImage) $X2 = _GDIPlus_ImageGetWidth($hImage) $Y2 = _GDIPlus_ImageGetHeight($hImage) $hGraphic = _GDIPlus_ImageGetGraphicsContext ($hImage) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1) ;$PicPreview = GUICtrlCreatePic("", 24, 152, 572, 268) _GDIPlus_GraphicsDrawImage ($hGraphic, 24, 152, 572, 268);? I have the same size and relative coords to $PicPreview in the image placement form1 I want to be Other Responsibi
  18. In the code that follows, it appears that DllStructCreate() is not allocating memory in $tag = 'byte val['&$iLength&']' . . Static Local $tvalue = DllStructCreate($tag) Running the code below, the problem does not show, but it does show in a much longer script: there _GDIPlus_ImageSaveToFile only writes about 30K bytes when it should write about 1MB, which it does when the code is $tag = 'char val['&$iLength&']' . . Static Local $tvalue = DllStructCreate($tag) It should write about 1 MB. I suggest caution in running the
  19. Here are two functions to provide pixel-accurate height and width dimensions for a given string. The more commonly-used _GDIPlus_GraphicsMeasureString built-in UDF is problematic because it returns the width padded by roughly one en-space (for reasons related to the various ways Windows produces anti-aliased fonts). These are AutoIt translations of Pierre Arnaud's C# functions, described in his CodeProject article "Bypass Graphics.MeasureString limitations" The first is an all-purpose version that takes a window handle, string, font family, font size (in points), style, and (opt
  20. UEZ has kindly provided me with code that rotates an image per a line: see here Because I want to trim a photograph after rotation, I need to crop the photo. I wrote code which calls _GDIPlus_GraphicsSetClipRect() to do this, but it places spurious stuff in the corners: see 2.jpg attached. I want only the trimmed photo to show. The original jpeg is also attached. The arguments to _GDIPlus_GraphicsSetClipRect() come from solving 2 simultaneous equations: if a and b are the width and height of the original photo, find x and y, the width and height of the rotated and cropped
  21. I am busy with building a solution for change monitoring of VOIP call program and to be properly automated means among others need for some limited OCR functionality. Current works of others are way too much overkill for this case what makes the need to build it myself. But to do it properly I significantly have to increase my knowledge about digital graphics management. For now I already have discovered here and there some mind blowing Autoit miracles what can be achieved with Windows own possibilities to manipulate that what is output to the monitor. And as far I can judge there are 2
  22. What I am trying to accomplish is to simplify a .PNG image and convert it to use only a specified pallet of colors. Eg if I have a pallet of 0xFF0000, 0x00FF00, 0x0000FF, it would change every pixel in the image to one of those three colors by whichever color is closest. The simplest method I have tried is simply converting the image to a 16 bit bitmap, and that does simplify the pallet of the image, but I want to be able to specify what colors it specifies to. The other problem is the resulting saved .BMP file is much larger (file size) than the original, and I don't know if it's
  23. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=car.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GDIPlus.au3> #include <File.au3> #include <Array.au3> #include <ColorConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> ; Declare array Dim $Images[1] ; Gets all JPG files in the current directory (@ScriptDir). Local $search = FileFindFirstFile("*.jpg") ; Check if the search was successful If $search = -1 T
  24. Hello all . i'm trying to build a tool to generate some pictures/graphs automatically based on some variables. I have completed the first part and I'm struggling now on what I thought would be the easiest part : In my tool there is a "preview" button, which helps to display on a new children GUI the generated picture. What I do in simplified : Global $g_hGraphics = _GDIPlus_GraphicsCreateFromHWND($g_hGUI) ;Then, I'll add multiple objects to this graphic, for example $Temp = _GDIPlus_ImageLoadFromFile($temp[1]) _GDIPlus_GraphicsDrawImage($g_hGraphics,$temp) I'm then
  25. Hello all. I'm trying to do something simple, but I can't manage to find where to start since I can have multiple possibilities and not sure what is the best one : Taking screen capture (I can do that) On this capture, I'll look for 10 particular regions that will give me 10 images of 40px * 40px (I can do that) Then what I want is for each of these regions, find on my library of ~140 images which one is the closest one to my region (= the match) What do you think is the best approach ? Ican easily do step 1 and 2, however for the third step : I can't us
  • Create New...