x


Detect WWW Image bitmap dimensions?

Is it possible to detect the dimensions of an image loaded through WWW?

more ▼

asked Aug 17 '11 at 12:37 AM

ina gravatar image

ina
3.3k 492 550 602

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

The image is a Texture2D, which has width and height properties.

more ▼

answered Aug 17 '11 at 12:38 AM

Waz gravatar image

Waz
6.4k 22 33 71

(comments are locked)
10|3000 characters needed characters left

texture width/height should work.

Tested with this c# example, gives 320x240: http://unity3d.com/support/documentation/ScriptReference/WWW.html

print("Size is " + www.texture.width + " by " + www.texture.height);

more ▼

answered Aug 17 '11 at 12:41 AM

mgear gravatar image

mgear
101 2

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x525
x355
x258
x20

asked: Aug 17 '11 at 12:37 AM

Seen: 945 times

Last Updated: Aug 17 '11 at 12:49 AM