• 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 mahdi68 · Dec 20, 2015 at 06:06 AM · androidtexturespriteapk

reduce APK file size

Hi , i have 100 image that i want to show these images on Image UI in my android project, i try to import these textures with Sprite(2D and UI) texture type. i set max size to 1024 and format to compressed. now size of each texture is 1mb ! after that i try to build project and exported APK file size is very huge. output file size is 124 mb ! is there any way to reduce APK file size ?

Comment
Add comment · Show 3
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 tanoshimi · Dec 20, 2015 at 09:49 PM 2
Share

Well, if you have 100 images that are 1$$anonymous$$b each, then output file size of 124$$anonymous$$b is pretty much to be expected, no...? What are your texture import settings? Have you disabled mipmaps? Try reducing the max size to 256, say.

avatar image mahdi68 tanoshimi · Dec 22, 2015 at 06:22 AM 0
Share

@tanoshimi average size of each image is 100k , i import this textures as sprite(UI) and i disabled midmaps. 256 max size show image very low quality.

avatar image _Yash_ · Dec 22, 2015 at 06:49 AM 1
Share

After reading all the comments, Try loading some of them from web ins$$anonymous$$d of including them in AP$$anonymous$$ or you have to compromise with little visual quality. As @PlanetVaster said, you can try 16 bit on the images which do not have gradients of color.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by PlanetVaster · Dec 21, 2015 at 12:07 AM

You could reduce max size to smaller than 1024, use jpgs instead of pngs, could also try 16 bits instead of compressed. That's about all you can do as you have 100mb of images so your actual app is only about 24 mb.

Comment
Add comment · Show 1 · 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 tanoshimi · Dec 21, 2015 at 07:02 AM 1
Share

The source image format is irrelevant and, since JPG is a lossy format, you should definitely NOT use JPGs ins$$anonymous$$d of PNGs. The relevant factor is the texture format with which the images are imported into Unity.

avatar image
1

Answer by beppim · Dec 22, 2015 at 07:57 AM

It does not matter which size or compression level is your image when you put it in the project, it only matters how that image is imported. So the first rule is: never use lossy compression (jpg) for your source images, as soon as you only will add artifacts to the image, without any advantage. 1MB for one 1024x1024 png image is not that much. I think that anyway 1024 is rather a big format for a cell phone, you can reduce the import size to 512. The second thing you can do is to import it as Crunched instead of Compressed, that should generate a lossy version and hence reduce the size. If that doesn't fit, the only other possible solution is to load the images from an online server.

Comment
Add comment · 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

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

45 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sprites and textureformats on Android 0 Answers

Sprites not showing on Nexus 7 (2012) 1 Answer

Sprites and textures appears black on Samsung Galaxy Grand I9082 0 Answers

Unity 2018 UGUI Android Sprite Textures Not Rendering Correctly 1 Answer

Size of texture after building too big 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges