I was wondering what are the pitfalls of deleting the ldpi/mdpi/hdpi folders on my android project? Can i just copy all the images in the drawable folder instead?
I did see the following links about UI development for android
http://developer.android.com/guide/practices/ui_guidelines/icon_design.html
http://developer.android.com/guide/practices/screens_support.html
thanks
PS: I 'm referring to all the images that are being used, background,icons,menus etc...
If you want to, go for it. Although not the best practice, if your application is quite conservative in terms of graphics then this may be a reasonable approach.
PROS:
Smaller .apk size
Easier to manage images (add/edit/remove)
CONS:
Images may be too high res or too low res for different screen resolutions.
If too high, images are scaled down on the fly which eats up processing power (+ unnecessary memory consumption).
If too low, images will lack detail and may look bad.
Lower-end devices have a lower memory cap (lowest being 16MB I think) - what may seem to work on your test device may not work on another (OutOfMemoryError!).
Update
If you want a quick way to make icons for all resolutions check out: Android Asset Studio
Related
I am an Android programmer, and I need to compress object's size like how WinRAR works for decreasing the size of folders and many file formats.
Please suggest software for decreasing the size of objects by compressing or decreasing polygons without changing quality.
Theres a few ways to do this. Assuming your objects are in .FBX format or .3DS or similar, Blender is a handy tool for any form of object changes, including reducing polygon count. Check out the tutorial below on how to do so via blender:
http://www.blender.org/manual/modifiers/generate/decimate.html
Once reduced, save and reimport/replace existing object back into the game. You can see the reduction in real time so you can find that sweet spot for when you feel the object is reduced too much.
If you want something within Unity, cruncher or simplygon are available in the asset store which is targetted to reduce polygon counts.
Simplygon
https://www.assetstore.unity3d.com/en/#!/content/10144
Cruncher
https://www.assetstore.unity3d.com/en/#!/content/4294
Hope this helps.
There is a Yahoo "Smush.it" service that allow to optimise image size.
I am looking for alternative way to reach the same goal using Linux application.
A lot of images need to processed and uploading them manually one by one seems not a good idea.
How such can be done in Linux ?
For jpegs I use JPEGmini and from what I tested it's the one with the best results keeping the same visible image quality while reducing a lot of the size, they have a server version for Linux which is not cheap and I never used.
There's also Mozilla's mozjpeg which you can use directly from the terminal, but it also reduces image quality.
In some tests I did, mozjpeg gives smaller files (not much) than JPEGmini's, but with lower image quality.
If you need to reduce pngs, you could try Trimage or some of the alternatives listed on the same link.
Smush.it's FAQ lists all the tools they are using in their service.
does android supports SVG or Tiny SVG ? I am having doubt like if i want to publish my application to android market which will cover different sizes of android devices then in that case i need to create same images with different densities, sizes etc.. and need to put on the different folders as specified in android developer guides. I just want to avoid it because it will unnecessarily increase the apk file size so rather than using this approach can we create the vector graphics file and store all image related information and add it in to the apk file.
but I am not able to find whether vector graphics approach will work in android or not and if it is working then how to use it?
Please provide me some valuable information about it.
Regards,
Piks
I found TinyLine. I have not tried it, but it seems to be sophisticated.
I have many images in the source folder, which are 10 MB each. I need to two operation on that image:
To compress that image and place it on destination folder 1
To create a thumbnail and place it on destination folder 2
As there are large number of images and they all are of huge size, can you guide me the fastest way to achieve this which consume less memory.
Disclaimer: I'm the author.
The http://imageresizing.net/ library does very memory-efficient image resizing - it's designed for server-side use, so naturally it is quite fast and designed for minimal memory use.
It's also simple to use.
ImageBuilder.Current.Build(sourceFile,destFile, new ResizeSettings("format=jpg;quality=90"));
ImageBuilder.Current.Build(sourceFile,destFile, new ResizeSettings("maxwidth=100;maxheight=100;format=jpg"));
There are 50+ different options - so pretty much any kind of automatic cropping, padding, seam carving, rotation, flipping, watermarking, etc. is possible.
I'm also working on a plugin which uses WIC for simple resize operations, which might give you a 2x speed boost. Let me know if you're interested in beta-testing it.
I want to create big texture which is power of 2 and put in this file a lot of smaller textures.
You know, I have several textures which are not power of 2 so I cant load them to my program. I have to put them in one file (512x512 for example).
Do you know any program which can do it for me automaticly?
Is there any limit of size of texture? Can I use for example 8192x8192 file? Or I have to use few smaller.
The keyword you're looking for is texture atlas.
The maximum texture size is GPU-dependent, 8k is fine on newer cards. Such a texture consumes, however, a vast amount of VRAM (and it gets worse if you count in MIPs). So it might be better to use several smaller textures and have only those in (hot) VRAM which you really need.
There are several applications that can help you pack images into a texture atlas. Zwoptex has both a free Flash version and a commercial Mac app. TexturePacker has a Mac and Windows app, and a command line version, some features are free and some require a paid license. These output the packed images into a single image and an associated data file with coordinates on the location of the packed images. They also can trim the transparent regions from around any given image, if any, saving even more space.
There are some more tools, some open source, listed in answers to this question.
The advantages of packing into one texture are potential space saving, but also fewer OpenGL state changes when drawing several images from the texture, for better performance.