HunT Posted February 11, 2013 Share 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. Link to comment
Anderl Posted February 11, 2013 Share 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. Link to comment
HunT Posted February 11, 2013 Author Share 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? Link to comment
Anderl Posted February 11, 2013 Share 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. Link to comment
HunT Posted February 11, 2013 Author Share 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. Link to comment
Anderl Posted February 11, 2013 Share 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. Link to comment
HunT Posted February 16, 2013 Author Share 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? Link to comment
HunT Posted February 16, 2013 Author Share Posted February 16, 2013 dxGetMaterialSize Before download? Link to comment
Anderl Posted February 16, 2013 Share Posted February 16, 2013 I wonder why would you need it. Link to comment
Cadu12 Posted February 16, 2013 Share Posted February 16, 2013 getimagesize imagecreatefromjpeg or imagecreatefrompng imagejpeg or imagepng imagedestroy header Click these functions. Link to comment
HunT Posted February 17, 2013 Author Share 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 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