You can get the width and height information by getting the texture. Don't return the value in this function.