HunT Posted February 11, 2013 Posted February 11, 2013 Hi guys. I need info about this function. My question is : if i use the fetchRemote for images the player download one time the images or every times? Tnx for reply. @Huntone_
Anderl Posted February 11, 2013 Posted February 11, 2013 I didn't understand your question. Using fetchRemote to get an image from a website is the same as getting a file's content and using dxCreateTexture to load it, it will get the file's content everytime you call it. There's even an example in the wiki for that. 1st, it gets the image content, sends it to the client. 2nd, the client calls dxCreateTexture which then returns the texture from what you sent to it. It's then stored in a variable. 3rd, you call dxDrawImage with that variable. If this is not what you wanted, I'd like you to explain it better. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
HunT Posted February 11, 2013 Author Posted February 11, 2013 Yup I know this,but i want make the real avatar selection. If i use the gridlist and click the name of player I download every time the image? @Huntone_
Anderl Posted February 11, 2013 Posted February 11, 2013 As long as you call fetchRemote when you click the name of the player, yes. Another way is to download everything in one time, and then just load them when you click the player row. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
HunT Posted February 11, 2013 Author Posted February 11, 2013 Ok tnx. If I make the check size image example 50x50 the download in not problem. But the wiki show only the example with dx function,I can use this in GUI element? Or work only with shader. @Huntone_
Anderl Posted February 11, 2013 Posted February 11, 2013 Since dxCreateTexture returns a texture element and guiCreateStaticImage only lets you load an image passing its path, no, it's not possible to use. You could save the pixels in a file and load it with guiCreateStaticImage, though. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
HunT Posted February 16, 2013 Author Posted February 16, 2013 I test This one and work fine,with check size image 50x50. But this is the problem i can check the size after download the image, but not before. How I can check the size before download? @Huntone_
HunT Posted February 16, 2013 Author Posted February 16, 2013 dxGetMaterialSize Before download? @Huntone_
Anderl Posted February 16, 2013 Posted February 16, 2013 I wonder why would you need it. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Cadu12 Posted February 16, 2013 Posted February 16, 2013 getimagesize imagecreatefromjpeg or imagecreatefrompng imagejpeg or imagepng imagedestroy header Click these functions. Ingame nick: Cadu12
HunT Posted February 17, 2013 Author Posted February 17, 2013 I wonder why would you need it. Why if the player enter the link with large image (example 3000x3000 3mb) other players download 3 mb for nothing,why after download the checker say : max size 50x50,and sure lag getimagesize imagecreatefromjpeg or imagecreatefrompng imagejpeg or imagepng imagedestroy header Click these functions. Tnx Cadu12 but i don't know the php never use this. --------------------------- Solved @Huntone_
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