Rad 0 Posted June 15, 2010 (edited) I've had this working program for quite a while now, but bought a new laptop with Windows Seven x64 (home premium). At first, the program would completely lock the system when I took screenshots with the _ScreenCapture_Capture() function (It would save the image with the bottom ~200pixels rendered, and would stop on the same pixel every time). So I ran the source code, and that problem is gone. The program worked almost fine... But the logic to downgrade the quality of the image no longer works. I used FileGetSize() to see if the file is under a certain amount, and if not I would convert it to a PNG, then to a JPG and continually downgrade it from there. This all worked fine on XP x32, and works fine for my friend running Vista x32. The rest of the code works as intended. The file gets uploaded, all of the windows look normal. The only thing that doesn't work is FileGetSize(). From the source code: global $MaxFilesize = 1024*400 func save_image($f) $bmp = $f&".bmp" if Not fileexists($bmp) then debug("Image does not exist for conversion ["&$bmp&"]") Else if FileGetSize($f) < $MaxFileSize then debug("Image does not need to be converted ["&$bmp&"]") if FileGetSize($f) = 0 then debug ("ERROR: Image filesize could not be determined ["&@WORKINGDIR&"\"&$bmp&"]") return -1 EndIf return $bmp EndIf EndIf ... This basically says "Does the file exist? Then is it smaller than XXX? Let's make sure it's not 0!". Now you can see the debug lines, heres what gets output to my console: Line 014 [11:30:51] Image was saved as [radshot 3testexe_2010-165-23-30-51-84.bmp] Line 015 [11:30:51] Image exists [radshot 3testexe_2010-165-23-30-51-84.bmp] Line 016 [11:30:51] Image does not need to be converted [radshot 3testexe_2010-165-23-30-51-84.bmp] Line 017 [11:30:51] ERROR: Image filesize could not be determined [C:\Users\Radley's G73J\Documents\Radshot VERSION 2.0\radshot 3testexe_2010-165-23-30-51-84.bmp] I will keep messing around with this, but is this a known issue? Is there a workaround? What should I try next? Edited June 15, 2010 by Rad Share this post Link to post Share on other sites
KaFu 295 Posted June 15, 2010 You're mixing up $f and $bmp? Filename seems to be $bmp, try FileGetSize($bmp) instead. OS: Win10-1909 - 64bit - German, AutoIt Version: 3.3.14.5, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2019-Dec-21) BIC - Batch-Image-Cropper (2019-Dec-11) COP - Color Picker (2009-May-21) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2019-Dec-07) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Share this post Link to post Share on other sites