The whole image resources of my game is less than 50MB. But the installation size in iphone is 292MB(it takes up only 90MB in android). I assume there should be something wrong about textures. So I duplicate an image folder(15MB) within the Resources directory. And the new installation file size expands to 400mb. How could an increase of 15MB pictures lead to a 108MB increase in ios installation size. I have been bothered by this issue for 2 weeks. Can anyone give me any hint?
Related
I'm having a bit of an issue getting an image (size 1.25MB, resolution 1080 height by 2520 width) to run on my android emulator. I can't figure out why resolution does this, but I'd like to preserve as much details as possible. So far I've tried:
Moving the image to different mipmap folders (no effect, image doesn't even get displayed and if drawable is say 120x480, that will be displayed, mipmaps don't work as source AT ALL for some reason).
Turning of hardware acceleration in manifest.xml (I'm assuming that's not a desired practice for release app). That works however the whole emulator gets really laggy.
Compressing image to smaller sizes. Still getting "trying to draw too large of a bitmap" error.
Any help would be appreciated!
Ok, I am new to audio with unity but despite reading all the Unity posts regarding audio adding 2 short .wav clips (I heard wav was smaller than mp3) to my app has added over 200mb. If this is the case, I will not be able to incorporate sound.
I have checked override iOS as that is how to compress images, but I don't know if my settings are compressing accurately.
Here is my settings right now:
Why are my audio files taking up so much space? How can I reduce this size?
Set "Load Type" to "compressed in memory" and you can reduce the quality to about 70%. And enable "Force To Mono".
I'm working with a Xamarin Forms app that uses a lot of button with images.
So after some time of navigation my android app crash, beacuse of out of memory problem.
How can I handle this problem?
You need to be very careful when dealing with images:
Before an image is displayed on the screen, it has to be loaded into
the memory.
Let’s assume you have a brand new device with full HD screen and 12 MP
camera. The picture you just took is 4000x3000 pixels large and the
total memory needed to display it is: 4 bytes * 4000 * 3000 = 48 MB for a single image!
What you need to do is:
Measure the view you’re showing your images in.
Scale / crop the large image accordingly.
Show only what can be displayed.
Above info from the below resources:
Read More : Here - Point #8.
Read More: Android (Walk-through on how to resize and crop images)
You can follow the same approaches using C# to resize the large images and display them efficiently.
I have tried to approach this problem several ways.
I have a web application that will load a sprite (which is a large jpeg that 'holds' 100 frames. Using the offset of div properties I am able to 'move' the image along so it looks like a movie clip.
This works well.
I need to produce the same on mobile devices.
I have to support Windows Mobile 6.5.
I was using jQuery/ajax to move the sprite image along to stop any flickering of the image within the browser.
Windows mobile 6.5 does not support this.
So, i decided to do a native app using C# Framework 2.0.
I thought about converting the sprite to a mp4 file and playing within a web browser control. but IE on the device will not support html5.
I have been told there is a CAB file from adobe so that I can play flash videos on the IE. But, apart from using ffmpeg to convert these images to a flv there is not much control as to adding menu like pause,stop,play etc when playing the flv file. I have not started any of this by the way i assume that would be the case.
So.. I thought if I download the sprite to the device i could use the graphics object of a picture box and render the rectangle of interest from large sprite to picture box.
I could not download the Sprite and save it to an image though. I get 'out of memory exception'.
I used the OpenNetCF.Drawing as it is supposed to support large files. I still get the error message. I have reduced the size of the image and it will work on about 20 frames.
I would then have to 'stack' these images containing 20 frames and load them up when necessary.
I am beginning to wonder now whether i am doing the right thing?
Is there a different way of trying to achieve what i am trying to achieve that is quicker and more efficient as I have run out of ideas.
If I am OK doing it this way then what is the best way to render images in a picturebox like a video. Memory efficiency says load the image from the file on the device when needed and dispose of it but that would cause 'flickering'. What IS the best way to handle multitude of images on a device?
i have plenty of code I can upload but I was worried the question would look 'messy' as I have tried so many things. I will of course edit/upload the code as required.
Thanks.
I have a front-end program for PND's running Windows CE (both 5.0 and 6.0) It user a high quantity of images (currently in png format) as buttons or for decoration purposes. The images are loaded from the SD Card via the new Bitmap(path);
I'm currently using v3.5 of the framework.
Upon loading, OS + my application have consumed 75 to 80% of the device's memory.
Wich good ways are there to optimize all that files?
The only ways that come to my mind to optimise these picture would be to resize them to the real size they are needed (like most icons will be used in a 16x16 size) and if you store also as bitmap no your card you can also set the used color palette to a size that matches the exact needs of the given picture (e.g. a picture of 16x16 has 256 pixels. So you need a maximum palette of 256 colors, but maybe also a self-defined 16 color palette is enough, cause in your picture are only 16 different colors.)
As a second approach you could also check if you maybe have the same picture multiple times loaded. In this case you should load it only once and use it multiple times.
A last one, that came to my mind belongs to background pictures. If you have a solid background you don't need a fully sized image of it. Just take a 1x1 bitmap and stretch it to the needed size. The same counts for gradient backgrounds, but in this case you have a 1x2 bitmap which will be stretched. And last but not least if you have a regular pattern, just take the smallest unique brick out of it and use some tile mechanism.
If you create the OS, is it possible to store the images as part of the OS?
In case it is possible, and the image is loaded fully to RAM, you can load the images only on a need to display basis and unload them when not needed. This will eliminate some loading time as well since accessing RAM is faster than accessing the SD card.
Another trick in with the same concept would be to copy all the images to a RAM based FS and load them only on a need basis - the down side is that this needs to be done after every reboot.