Jalehandro Posted September 27, 2016 Share Posted September 27, 2016 Hi. I encountered some problem using dxDrawImage. I have a simple user icon drawn on the screen and for some reason there is a stripe at the top of the image which is invisible in photoshop or using guiCreateStaticImage. Side to side comparison: dxImage vs guiStaticImage Code: guiCreateStaticImage(300, 100, 200, 200, "images/icon_user.png", false) addEventHandler("onClientRender", root, function() dxDrawImage(300, 350, 200, 200, "images/icon_user.png") end) Any idea what could it be? Link to comment
!#NssoR_) Posted September 27, 2016 Share Posted September 27, 2016 (edited) Nothing happens with me ! , I think the problem from your picture . ( Try to change it ) Edited September 27, 2016 by NssoR Link to comment
Jusonex Posted September 27, 2016 Share Posted September 27, 2016 Try this: guiCreateStaticImage(300, 100, 200, 200, "images/icon_user.png", false) addEventHandler("onClientRender", root, function() dxSetBlendMode("modulate_add") dxDrawImage(300, 350, 200, 200, "images/icon_user.png") dxSetBlendMode("blend") end) 2 Link to comment
Jalehandro Posted September 27, 2016 Author Share Posted September 27, 2016 I tried your code but it didn't get rid of the stripe. However, I realized the stripe is only there when the image itself is touching the border, so I resized the image and it now has some space between the border and the image (sort of padding) and the stripe is gone. Thanks for your suggestion though, the issue is now solved. Link to comment
Holyschytt Posted December 26, 2016 Share Posted December 26, 2016 (edited) I know this is an old Post but the 2 above this post actually didn't know what his problem was it wasn't the code its his image any image that is transparent or ain't canvas just right will show grey lines its because your image for one is not the size for the game its bigger and, your forcing it a smaller size only solution i can tell you or anyone else that having issues with images with gray lines on the edges is Canvas the transparent image bigger so you wont have them Gray lines when scaling with the image .. If my sentence sucks oh well i tried my best.. Again sorry for bumping an old post.. Edited December 26, 2016 by Holyschytt Link to comment
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