• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by rudolfwm · Feb 21, 2011 at 03:47 PM · texturewwwdownloadtextureformat

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?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rudolfwm · Feb 21, 2011 at 04:09 PM 0
Share
  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!

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Eric5h5 · Feb 21, 2011 at 06:50 PM

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rudolfwm · Feb 22, 2011 at 07:51 AM 0
Share

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.

avatar image Eric5h5 · Feb 22, 2011 at 08:00 AM 0
Share

@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.

avatar image
1

Answer by jonas-echterhoff · Feb 21, 2011 at 07:39 PM

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!

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rudolfwm · Feb 22, 2011 at 07:52 AM 0
Share

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.

avatar image rudolfwm · Feb 22, 2011 at 07:57 AM 0
Share

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

avatar image jonas-echterhoff ♦♦ · Feb 22, 2011 at 09:28 AM 0
Share

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

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

How to load interlaced streamed image into a texture? 0 Answers

Can I access previously downloaded textures? 2 Answers

WWW class downloading image doesn't work in Web Player? 1 Answer

www.texture textureType to GUI 0 Answers

www.texture memory leak 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges