GUI Texture: Match dimensions of image

Hey there,

I have a function that swaps different images in and out of a GUI Texture object, problem is that they don't match the size that they should be.

For example: I start with the default Unity image, then call the function to change the new image in, but it maintains the dimensions of the Unity placeholder (its really tiny!), is there anyway to get the swapped in image to the correct size?

Thanks!

Set the pixel inset values based on the texture's width and height.