Jump to content

Search the Community

Showing results for tags '_gdiplus_imageloadfromfile'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hi I am having problems loading an image using _GDIPlus_ImageLoadFromFile. Each attempt fails at the "Load error" line of code which shows an error code of 1. The same error code is returned if the file does not exist yet these files do exist and I am supplying the full path of the file required within the local filesystem. Also, if I copy and paste the text of the file path from the debug statement in the code into a command prompt and hit enter, it will display the image in question. These are all jpg files created using INetGet. Where might I be going wrong please? Any help would be appreciated. My code is below.           If FileExists($aImgLst[$j]) Then               FnuDebug("jpg: " & $aImgLst[$j])             $hBitmap1 = _GDIPlus_ImageLoadFromFile($aImgLst[$j])             If @error<>0 then MsgBox(0,"", "Load error " & @error & ", handle=" & $hBitmap1)             $hBitMap2 = _GDIPlus_ImageScale($hBitMap1, $dScale, $dScale)             If @error<>0 then MsgBox(0,"", "Scale error " & @error)             If _GDIPlus_ImageSaveToFile($hBitMap2,$aImgLst[$j] & "Small") <> True Then               MsgBox(0,"", "Image error: " & @error & " (" & $hBitMap2 & ")")             EndIf           EndIf Thank you.
  2. Hi! It took me an hour to find out, that FileMove() doesn't work in _Example1(). But what's the reason? #Include <GDIPlus.au3> $sSource = 'C:\Wallpaper\AnyImage.jpg' $sDest = 'C:\Wallpaper\16_10\AnyImage.jpg' _Example1() ;~ _Example2() Func _Example1() _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($sSource) _GDIPlus_ShutDown() FileMove($sSource, $sDest, 1 + 8) EndFunc Func _Example2() FileMove($sSource, $sDest, 1 + 8) EndFunc I wrote a small script to sort wallpapers by their aspect ratio (16:10, 16:9, 4:3, ...), but it doesn't work, because FileMove() doesn't move any images to the desired destination. At least it creates the directory structure.What could be the solution for this problem? _Example2() works as expected. My system: - AutoIt v3.3.6.1 - SciTE v1.79 - Windows 7 Ultimate (64-Bit) Bye
×
×
  • Create New...