IAMK Posted April 4, 2018 Share Posted April 4, 2018 (edited) Hello, I have spoken to the artists in my company, and none of them understand the cause of this issue. Apparently NO masking is done, so the pixel colour of the image should not be changed. Example: Layers.png I cannot show the actual image, as it's from an unreleased game. Bottom->Top layer: Green(image), Black(animation), Red(animation), Orange(image). If I check the pixel colour of the green image, it changes (which I thought was caused by a mask from the animations which covered the image, but is apparently not the case according to the artists). As for the orange image, which is in the very top layer, the pixel colour of the centre remains a solid colour as it's supposed to, but if you go closer to the edge which is above the black animation (even 50pixels away), the pixel colour starts changing. Even if masking was an issue for the green image, this should NOT be the case with the orange image, which is on the top-most layer. The script I use for pixel colour detection: IAMK_PixelColour.au3 Something I can share: The script does not work properly on this forum. Run the script and see that hovering over the grey and white parts on this forum yield the same decimal colour. It remains "16382457" on the left, and ??? on the right... Image: LookAtThese.png I took 4 screenshots while writing this thread. p.s. the cursor is slightly up and to the left of the box in the pictures. If you take a screen shot of this page, past it into Paint, paintbucket the grey to black, you will see it perfectly recolours up until the white. There is no gradient. It seems to be reading a mix of colours below or something? Question: What is the issue with my script? Or what is the issue with PixelGetColor()? Or how does AutoIT calculate/determine "pixel colour"? My assumption was that regardless of monitor, the COLOUR of each PIXEL was simply ONE VALUE (the very top-most value) of a render. Meaning if you have 5 animations layered in a single frame, only the top-most value would be recorded for the pixel (assuming no transparency is used). An animation WITH 100% transparency should keep the layer below it 100% unaffected. Thank you in advance. IAMK_PixelColour.au3 Edited April 4, 2018 by IAMK Link to comment Share on other sites More sharing options...
rudi Posted April 4, 2018 Share Posted April 4, 2018 (edited) Using this script I cannot reproduce your issue: While 1 $aMouse=MouseGetPos() $color=PixelGetColor($aMouse[0],$aMouse[1]) $hex=Hex($color) $Red=StringMid($hex,3,2) $Grn=StringMid($hex,5,2) $Blu=StringRight($hex,2) $ToolTxt="Dec: " & $color& @CRLF & "Hex: " & $hex & @CRLF & @CRLF & _ "Red = " & $Red & " = " & Dec($Red) & @CRLF & _ "Green= " & $Grn & " = " & Dec($Grn) & @CRLF & _ "Blue = " & $Blu & " = " & Dec($Blu) ToolTip($ToolTxt,$aMouse[0]+30,$aMouse[1]+30) Sleep(100) WEnd regards, Rudi. edit: Changed the sample script to show more details Edited April 4, 2018 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
IAMK Posted April 5, 2018 Author Share Posted April 5, 2018 @rudi, I have tried your variation of the script, but I still have the same issue. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 5, 2018 Moderators Share Posted April 5, 2018 @IAMK is this a game written in AutoIt? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
IAMK Posted April 6, 2018 Author Share Posted April 6, 2018 (edited) @JLogan3o13, No. I'm the only person who uses AutoIT. It's written in c++. The issue can be seen on this website as well (pictures attached). p.s. I'm not trying to bot in a game (against rules). It's my company's game I am trying to automate a video record sequence for consistency and error avoidance. Edited April 6, 2018 by IAMK Link to comment Share on other sites More sharing options...
JohnOne Posted April 6, 2018 Share Posted April 6, 2018 Sounds like a dpi issue, seeing a lot of this lately. Worth a search. Would make sense for the dpi issue to be dealt with internally, in my worthless opinion (IMWO) IAMK 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
IAMK Posted April 9, 2018 Author Share Posted April 9, 2018 @JohnOne, You, my sir, are a champion. I have no idea why DPI scaling would cause this issue. My screen was set to 125%. It seems the pixels stay as they are in the software, but my screen shifts the pixels before displaying them on the screen. It works fine now. JohnOne 1 Link to comment Share on other sites More sharing options...
JohnOne Posted April 9, 2018 Share Posted April 9, 2018 Ace. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TheXman Posted April 27, 2018 Share Posted April 27, 2018 See if adding the A3Wrapper directive helps: #AutoIt3Wrapper_Res_HiDpi=Y ;(Y/N) Compile for high DPI. Default=N CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now