x


WWW 16 bits textureformat download possible?

Is it possible to download textures which are 16bits into a 16bits texture directly?

Right now, when its downloaded its always 32 bits. Which is silly, since I want the 16bits. SO I need to convert it to another texture...

Can it be done in one go?

more ▼

asked Feb 21 '11 at 03:47 PM

rudolfwm gravatar image

rudolfwm
119 2 2 11

  1. The texture I download is in 16bits format.
  2. When its downloaded the www.texture.textureformat is 32 bits
  3. When I make a 16bits texture and use LoadImageIntoTexture it becomes a 32bits texture!
Feb 21 '11 at 04:09 PM rudolfwm
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

You could use an AssetBundle to download assets exactly as you imported them into Unity. Why do you require your textures to be in 16 bit format?

Edit: AssetBundles are indeed a Pro only feature. But, to save memory, compressed textures are much more useful then 16-bit textures anyways, as they are smaller and natively supported by the GPU. compressed textures can be loaded using WWW.LoadImageIntoTexture!

more ▼

answered Feb 21 '11 at 07:39 PM

jonas echterhoff gravatar image

jonas echterhoff ♦♦
9.7k 7 23 102

Its for the iPhone. I need to save memory. Unfortunately I need to download textures from a website. I can only preprocess them with a .NET tool I build for this purpose.

Feb 22 '11 at 07:52 AM rudolfwm

IS there a way to generate on your own (outside of Unity) assetbundles? (I guess not since its a Pro feature)

Feb 22 '11 at 07:57 AM rudolfwm

I edited my answer with more information based on your comments.

Feb 22 '11 at 09:28 AM jonas echterhoff ♦♦
(comments are locked)
10|3000 characters needed characters left

No, 16-bit is not supported for downloads through WWW. There's no such thing as a 16-bit JPG or PNG anyway.

more ▼

answered Feb 21 '11 at 06:50 PM

Eric5h5 gravatar image

Eric5h5
80.1k 41 132 519

Good point, I would like to point out the following though: I use a .NET tool to download and process images from a website that I need in the app. When I set the bitformat to System.Drawing.Imaging.PixelFormat.Format16bppRgb565 the SIZE of the fileis 92.7 Kb versus 172.3 Kb when I use the default format. Based on this I assumed (perhaps wrongly) that there is such a thing as 16bits .jpg, otherwise I cant explain it.

Feb 22 '11 at 07:51 AM rudolfwm

@rudolfwm: JPG simply does not store data in bits like that. It doesn't even use RGB, instead it stores image data as luma and chroma info, represented with discrete cosine transforms. You can specify lesser or greater amounts of compression, but not bit depth.

Feb 22 '11 at 08:00 AM Eric5h5
(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:

x2191
x524
x195
x5

asked: Feb 21 '11 at 03:47 PM

Seen: 767 times

Last Updated: Feb 21 '11 at 03:47 PM