png optimizing - Hero, G2 Touch Themes and Apps

Hey guys, I may be way off on this... but just tell me if my thinking is sound.
One of the things I see people doing in themes and roms is optimizing all of the png's for a smaller file size. At first glance, that seems like the thing to do -- Less in memory, less size = better.
But I know that on applications that need to load images very fast it is always better to make them as uncompressed as possible. That way, in order for the system to show the image, the cpu has less to uncompress before displaying it.
An example would be on my HTPC. There are all kinds of fan art and huge wallpapers that change with each click to the next menu. So when I switch from Music to TV Shows. My wallpaper switches from a picture of AC/DC to a picture of the cast from "House". The first thing everyone will tell you to do is convert them to bitmaps. Bigger file size but way less for the cpu to do in order to show it. This helps with not having a delay or one of the pictures not showing up for a split second.
Now I know we can't use bitmaps because we need the transparency. But with such little cpu power on these phones, wouldn't we want the pngs to be as uncompressed as possible?
As I said, let me know if there is something I am not thinking of. The answer could be as simple as the cpu required to uncompress the pngs has less impact that a few more megabytes of memory being used. Not sure if anyone has done any testing on this.

You can try re-saving with minimal compression using IrfanView or a similar tool (even Photoshop I'm sure).

Oh, the I am a web developer. I work with image compression everyday. Thats not the problem, I just wanted to know if anyone had considered this or if there is another reason I'm not thinking of.

Related

[INFO] Solved Internet Globe w/o XML Editing

Procedure To Edit The Internet Globe Button Manila Files
(No more solid white blank buttons)
7d3f1247_manila - Globe Unselected
3f00cd2f_manila - Globe Selected
What:
With this procedure you will be able to select any graphics or highlight color you want to use for both the selected and non selected states of the Internet globe button.
How:
There are no special tools required other than Manila Editor 0.2 and a graphics program that can work with png files. You will need to know how to use both of these programs though.
Advantages:
The biggest advantage over editing either 27c65cbd_manila or InternetPortal-en-US.xml would have to be speed. When I tried that way on my Fuze it would take well over 5 seconds to load every time I scrolled to the Internet tab. Sometimes almost double that on a fresh boot. Second advantage would be that this *should* work on any device that uses those 2 files, where the xml edits are different files for different devices. Which leads to the third advantage of not needing special install instructions for theme makers. Edit the manilas and drop them in with the rest.
Other Info:
(Just skip this part if you don't care about the why and scroll down to the instructions.)
I have literally scoured these forums and the Internet for days trying to find information on editing not only the Internet globe manila files, but the other 7+ files that just don't work right with Manila Editor. Most theme makers know of these files. Mostly what I found was a lack of information and more questions than answers. The only other procedure I could find at all for converting manila files gives better results than using Manila Editor but it's very complex for the average user requiring command line tools. Even so the author, (Chainfire) has written a damn near fool proof tutorial so if anyone is interested you can find the thread HERE. Unfortunately even that procedure would not handle the problem manila files properly and quits with the following message.
Reading file: 5c01b59c_manila
Error: file is not QTC format
For reference, this is the list of files that I know of at the moment with this problem, and all return the same error except for 7d3f1247_manila. (More on this file to come.)
7d3f1247_manila - Globe_Unselected (512x256) 28.5k
3f00cd2f_manila - Globe_Selected_D (512x256) 64.5k
40ec2415_manila - Small Avatar_D (64x64) 2.5k
2f411611_manila - Exclamation Point_D (256x256) 32.5k
4d97cac6_manila - Add Contact_D (256x256) 32.5k
54e0759d_manila - Contact Avatar_D (256x256) 32.5k
400b663e_manila - You Tube_D (64x64) 2.5k
55cc771a_manila - Selection Highlight Bar (512x256)64.5k
5c01b59c_manila - Contact Avatar2_D (256x256) 32.5k
The first oddity I noticed when using Manila Editor on the Globe file (3f00cd2f_manila) is no mater what size my graphic was before running it through, it always came out to be approximately 125k. Since the stock file was roughly half that size I knew something was really wrong. The other glaring anomly with most of the files is they show up as duplicated (side by side) images when viewed with M.E. so I figured that somehow all of this must be connected.
I am not a programmer by any stretch but I know just enough to get me into trouble most of the time. Anyway I loaded both files into Notepad++ and turned on hex view to see what was so different. The header of both files were similar but not exactly the same so I copied chunks of the problem file from below its header and pasted it into the good manila at the same address location. What it produced was a repeating pattern on the top left corner of the stock green button but every other row was white. I don't know why but the fact that the image repeats in M.E. as well and the file being double the size made me think to cut the image in half and try to see if M.E. would accept it. It did and I was elated to finally see an image on my phone other than than the big white rectangle.
I had an image that was really distorted but it wasn't difficult at this point to see what was going on by the way it was distorted. I was able to get a perfect button on my next try by creating my image on a 256x128 canvas and then scaling it to 512x128. It looks really bad and stretched out at this point but after processing with M.E., the phone will compress back to it's original aspect and it looks just perfect. I use The Gimp as my image editor and just save as a png file with the default settings.
Now that I Finally had a working selected globe image I wanted to change the static globe as well. (7d3f1247_manila) This was a whole new battle but at least I had something to work from this time. There are some significant differences in this file compared to the selected globe. First, it looks perfect when you extract it using M.E. which led me to believe that this would be easy. I couldn't find much info on this particular manila and I think I know the reason why. Either people are replacing both images via the xml workaround, or they are just concerned with getting the highlight the right color on the selected image. Either way, when I tried to do a 1:1 replace in M.E I got to see the wonderful white rectangle again. At this point I had finally gotten all the tools working from the post I mentioned before and decided to try this file using that procedure as it should return better results if it did work. It worked perfectly but I still wanted to get it to work using M.E as most people are not going bother with a long drawn out procedure.
After playing around some I found that if I scaled the 512x256 image to 256x256 it worked perfectly. The up side is the file size is half of the stock image. The down side is the resolution is obviously cut in half. It's really not a show stopper but using the other method does produce perfect results. Not completely satisfied yet I tried some more images at different resolutions to see what happened. The 480x240 image I had from one of the globe mods that are floating around produced a white rectangle. I then decided to try another unscaled image that was almost completely transparent and it worked without a hitch. Now that I was completely confused I went back and tried the original 512x256 that produced the white and it did so again. It wasn't until I switched to another tab and back again that it finally showed up correctly.
So what does it all mean? Hell if I know but at least the scaled 256x256 method seems to work every time without any problems and its fast to boot. The long procedure would be the best method of them all but probably not worth the effort for most. As far as the other problem files go I guess I'll try and work them out too unless someone else more capable picks up the ball and runs with it. The selected globe was the particular image that stuck in my craw and got me started on this.
Instructions for 3f00cd2f_manila - Globe Selected:
1. Create your image at a size of 256 x 128 exactly how you want it to look on your device.
2. Scale it to a size of 512 x 128 and save it. You will have to "unlock" the aspect ratio lock in most graphics programs. This will distort your image badly but do not fret. Yet.
3. Fire up Manila Editor as usual and use your new image. Now you can fret as you wait to see if this works or not.
4. <-- I hope
Instructions for 7d3f1247_manila - Globe Unselected:
1. Create your image at a size of 512 x 256 exactly how you want it to look on your device.
2. Scale it to a size of 256 x 256 and save it. You will have to "unlock" the aspect ratio lock in most graphics programs.
3. Fire up Manila Editor as usual and use your new image.
General Notes:
If you don't want to mess with any of this and like what's in the screen-shots attached, you can install the cab or just unpack the zip into your windows directory on your device. As always, please back up your files before adding new software.
Notes concerning 7d3f1247_manila:
This procedure *should* work if done as stated. If you use the alternate method I linked to in the info section above you don't have to scale the image and will get a higher resolution image. I have successfully used a non scaled image before with Manila Editor but it goes white on first load after a reboot then somehow clears up. With the scaling method I've yet to see the dreaded white rectangle. Read the info section for more information.
More Information:
Manila Editor 0.2.0
Editing Manila
Manila 3D Porting
Pixel Perfect TF3D ***
Manila Fine Details
Cheers,
Eidolen
*Disclaimer*:
Obviously I can't test this on every device but I can't think of any reason why this wouldn't work on any TF3D enabled device. If this doesn't work for you, feel free to post here or contact your congressman. (Where applicable) If this helps anyone please be sure to drop in and say hi.
There is some real development going on about this subject over on the pixel perfect thread. If you are just looking for a quick fix then what I posted above is still relevant but you might want to keep an eye out for a *real* fix as I doubt it will take them long once they sink their teeth into it.
I believe they already figured out that you can patch the header on the problem files to correct the payload size which should work also. If you are not so technically inclined then the method posted here still works flawlessly for me and should for you as well.
I've added a picture that might help if the directions above were confusing at all, so it might help clear it up. You can find the link to the Pixel Perfect thread right above this post.
Cheers,
Eidolen

[REQ] MS Paint / Image resize for Raphael

I'm sure others have come across this...
My carrier's limit on sending MMS is ~300KB. Our 3.2mp pictures are much larger. That and most people I want to send MMS's to don't have a 300 by whatever + resolution screen on their phone.....
So I'm looking for a simple, easy to use, app that will just resize images for me. I know the MMS software in most ROM's will auto-convert them to some sizes, but I'd rather just save the images at that size to begin with... and send that smaller file myself (also good for uploading to ftp servers to share via e-mail to other mobile devices)
I did some browsing, and i saw maybe some versions of HTC Album do resizes... but I'm not really looking to update that yet... most other google searches around 'pocket pc paint' or 'wm6 image resize' end up with themes and the like -- I need an on-phone solution.. I don't want to be tied to a computer to resize an image!
searches:
http://www.google.com/search?q=wm6+...s=org.mozilla:en-US:official&client=firefox-a
http://www.google.com/search?hl=en&...ficial&hs=aGH&q=wm6+resize+photos&btnG=Search
http://www.google.com/search?hl=en&...ficial&hs=7vb&q=ppc+resize+photos&btnG=Search -- came up with some results, but I've never haerd of a lot of these solutions, any feedback?
hmm, did you want the original picture to be 3.2 MP? If not, then just take the picture at a lower resolution?
Other than that, although I have not played around with it, an app called Photogenics may be able to do it. Keep in mind though, it's not freeware.
Resco Photo allows you to downsize photos. You can select what pixel size you want, or type in a percentage. Its does a lot more stuff too, its not free though.
I have AT&T and they limit mms to 600k. Is that your carrier as well?
Motorious said:
hmm, did you want the original picture to be 3.2 MP? If not, then just take the picture at a lower resolution?
Other than that, although I have not played around with it, an app called Photogenics may be able to do it. Keep in mind though, it's not freeware.
Click to expand...
Click to collapse
I like taking high-quality pictures in case I want to share them by e-mail / upload them, or save them for later use as something..
But I also want to resize them for friends when i send it to phones. and at&t requires it to be smaller in size to send via MMS... as another poster mentioned.
Cropping would also be nice... I was mainly looking for a free solution, but If i gotta pay I gotta pay.. I prefer donating to developers here over paying for product from companies though.
The authors of XnView (a freeware ACDSee clone) have recently published a version for PocketPCs and Windows Mobile Smartphones. It works very well on my Touch Pro. Allows retouching, resizing, modifying colorspace, batch conversion to many formats and more.
http://www.xnviewpocket.org/
Photo Resizer
ยป PhotoResizer v1.0 Description
With PhotoResize you can copy and resize JPG images from a folder to another selecting the quality and output size of target image.
This tool is useful when you want to copy your photo from your camera to your PDA and show them at your friends using a PDA as photo album. (As I usally do)
The main problem is that every single image done with your camera (depend wich camera you use) is usually several megabytes and if you simple copy photo from camera in few time you will finish the memory available on your PDA.
With this tool you can reduce the space on each photo resing it to the dimension of your PDA screen (usally 320x240, 320x640, or 640x480). In this manner the dimension of files are drastically reduced and you can show images directly from PDA. During the conversion phase a progress bar will show you the percentage of work, if during conversion will be found an image with dimension less then the output size, that image will be skipped.
Funcionalities:
* Select source folder and destination folder graphically
* Choose target size of images
* Choose quality (default is 75%)
* Choose if you want to see the thumbnail during the process (this option can be time comsuming)
the PhotoResizer v1.0 free for Pocket PC

[STRANGE IDEA] increase HTC Diamond speed by reducing the color depth of the images

I just got a pretty strange idea when i scrolling through the Window folder.
i discovered that all images has 32 bit color depth. 32 bit = 4294967296 colors.
And the Diamond can only handle 65000 colors.
So by reducing the color depth of all image (around 1000 ea) we can save a lots of space and the load time will speed up i think ??!!!
And it wont be possible to see any difference.
So what do you think ???
Sorry for my real bad english
This idea could be great, that's for sure. I've been working with programming in 28 years so I know what I'm talking about.
I'm not entirely sure how good it is though, let's hope for other members opinions.
it's windows mobile that can only handle 65k colours. I'm pretty confident the hardware might be able to handle more. it's weird that the OS-files has more colour depth than the OS actually can show though.
Yeah Microsoft must be the smartest people in the WORLD !!! NOT !!!
could very easy be that wm would
1. fail to use the Image if it's made only to work with 32bit images
2. convert the images before applying them which would result in
more cpu usage

[Q] 8 bit? Themers Please help

Hi all, i am trying to work on a theme for the Droid X. Can anyone tell me why some of the images open in photoshop incorrectly and more to the point how to fix them?
I cant post a link apparently to the image or a http link since i'm new but
You can view the image here. http:/ / dl.dropbox.com/u/6769503/8bit.jpg
Is there a setting or something I can change in PS to open these correctly?
Thanks for your time.
KraYzeE
krayzee said:
Hi all, i am trying to work on a theme for the Droid X. Can anyone tell me why some of the images open in photoshop incorrectly and more to the point how to fix them?
I cant post a link apparently to the image or a http link since i'm new but
You can view the image here. http:/ / dl.dropbox.com/u/6769503/8bit.jpg
Is there a setting or something I can change in PS to open these correctly?
Thanks for your time.
KraYzeE
Click to expand...
Click to collapse
What is the original file extension? .png?
I had this same problem with some .png files wich had transparency in windows image viewer, but not in photoshop.
My solution was to open it in Paint.net and save it, rewriting the original image. Please be sure to set the transparency correct whilst saving in paint.net.
Download Paint.net
Thanks for the reply, yes it was a PNG, ill try paint.net but i would really like to use Photoshop. I cant understand how it can mess up the transparency and anti alias like that.
Update: Paint.net does indeed open the file correctly... so while i do now have a solution. I would still like to find out why Photoshop (both CS4 & CS5) open it incorrectly ?
Well technically 8 bit pngs are indexed images with a varying amount of colored pixels and then varying amount of transparent and semi transparent pixels so some programs might not like this. I would recommend gimp over ps as its similar but doesn't have this issue.
Sent from my HERO200 using XDA App
that image actually seems correct, can you post an image of the alpha channel? then we will know if photoshop is not reading the file correctly
As one poster said, it's because the images is indexed. If you do Image > Mode > RGB, it will un-index it. I must warn you though, PS is HORRIBLE with indexed images. Use GIMP/Paint.NET to un-index it to save yourself a headache
JAguirre1231 said:
As one poster said, it's because the images is indexed. If you do Image > Mode > RGB, it will un-index it. I must warn you though, PS is HORRIBLE with indexed images. Use GIMP/Paint.NET to un-index it to save yourself a headache
Click to expand...
Click to collapse
Ahh but then you lose the 8 bit optimization, even running optpng will not put it back to index png cause it will ossy optimize it. So just use gimp.
Thanks for the replys guys.
Here is an example image.
http:/ / dl.dropbox.com/u/6769503/btn_circle_pressed.png
If you open it in PS, you will see what i mean, changing it to RGB does not change the image. I can open it correctly it Fireworks, then save it without making any changes, and then i am able to open it in Photoshop correctly.
This will do for now in case anyone else runs into this issue. The file size isn't too much bigger this way, so it will work for now.
Thanks again to all that helped.
http://dl.dropbox.com/u/1631008/btn_circle_pressed_fixed.png
Here's the image fixed, it was indexed... all I did was open it up with osx Preview and save it again. Or you can try this gimp they all talk about but I think it's overkill to switch to another program just because 1 or 2 images are weird, especially after you paid for your copy of Photoshop.
DBBGBA said:
http://dl.dropbox.com/u/1631008/btn_circle_pressed_fixed.png
Here's the image fixed, it was indexed... all I did was open it up with osx Preview and save it again. Or you can try this gimp they all talk about but I think it's overkill to switch to another program just because 1 or 2 images are weird, especially after you paid for your copy of Photoshop.
Click to expand...
Click to collapse
Thanks for your help. I don't have OSX and i absolutely cannot get used to Gimp. but opening it in adobe fireworks and saving it again right away does the trick, so although it's a pain, its simple to do.
If anyone ever figures out a way to directly open these types of files in Photoshop i'd be glad to know.
Cheers
KraYzeE
krayzee said:
Thanks for your help. I don't have OSX and i absolutely cannot get used to Gimp. but opening it in adobe fireworks and saving it again right away does the trick, so although it's a pain, its simple to do.
If anyone ever figures out a way to directly open these types of files in Photoshop i'd be glad to know.
Cheers
KraYzeE
Click to expand...
Click to collapse
Yes that works but your removing the indexing. Android uses indexed pngs wherever possible because this saves space and resources, if you changed every file in the android system to rgba your phone would be noticeably slower.
If you change it to rgba and then run optipng on it you'll see it will not index cause it can only lossy optimize, but if you set the mode to index and then optimize it you'll notice then file will be considerably smaller with little or no image quality loss. So in short your removing a vary important optimization feature of the android system.
If your looking for a quick image conversion tool try image magick, this will allow you to write scripts to convert them png24/32 to png8 and back whole folders at a time.
well as we do with video it's always better to work with uncompressed, high res images. Then when everything is done and set in stone we compress and optimize without loosing too much image quality.
If i had to start a theming project I'll probably do the same, convert everything to high res, work on it then compress to a more optimized format.
DBBGBA said:
well as we do with video it's always better to work with uncompressed, high res images. Then when everything is done and set in stone we compress and optimize without loosing too much image quality.
If i had to start a theming project I'll probably do the same, convert everything to high res, work on it then compress to a more optimized format.
Click to expand...
Click to collapse
Yeah for video thats fine, but in theming and specifically for this file gimp will allow you to work on the indexed file and you literally can not tell the difference with the indexed file being atleast 50% smaller. Maybe this would make sense with an image that has alot of quality or is high res but in this instance it a loss of time and added steps when the same could be accomplished with industry standard tools.

[Q] Need Help with Boot Animation

Hi, I need help with a boot animation I am making. I followed all the instructions for it and its still not working. I just get a black screen during boot where the animation was supposed to happen.
This is for my Nexus 1 btw running CM 6.1.1. the boot animation is basically a siege tank from Starcraft 2 setting up and then packing up again.
I placed the zip in /system/media
Each png is 180x135.
Can someone please look at the zip and see what I am doing wrong? it would REAAAAAALLY help.
More than likely your missing an empty line at the end of your desc.txt, common problem.
Added extra line , didn't work
I added the extra line at the end of desc.txt and its still the same result. Ugh.... I have uploaded the new revised zip.
One problem that i had run into is that i was not zipping them in the least compressed format. make sure that you use fast(minimal) compression.
Compression
Yeah, I tried it both ways with WinRar and 7-Zip and made sure it was set to "Store" as the minimal to no compression option.
Here is my suggestion. This is the desc.txt file i use for all mine and it works fine. Change the resolution in the file and try using that one.
Desc
heres the bootanimation.zip with a changed desc.txt file
YES!!!!!!!!!! ^.^
ianreecej said:
Here is my suggestion. This is the desc.txt file i use for all mine and it works fine. Change the resolution in the file and try using that one.
Click to expand...
Click to collapse
OMG Thank You!!!! It works perfectly now. I don't know what happened before. Now I am going to try to mess with the resolutions to see if I can get everything bigger and cleaner.
Do you by chance know if there is a limit to the size of the boot animation? I made it 8mb because I wanted to keep it lean and fast. If its around 25 mb, will that affect performance?
demoneyes905 said:
OMG Thank You!!!! It works perfectly now. I don't know what happened before. Now I am going to try to mess with the resolutions to see if I can get everything bigger and cleaner.
Do you by chance know if there is a limit to the size of the boot animation? I made it 8mb because I wanted to keep it lean and fast. If its around 25 mb, will that affect performance?
Click to expand...
Click to collapse
No Problem. The limit is really the space on your internal memory as far as i know. If you can fit it on there it should be fine. I know for myself with a droid incredible i can go to about 20 megabytes but that is only again due to my limited internal memory. If you were to move some apps to the sd card etc you can probably free more space.
Drop me a PM if you have questions or need a hand anytime.
Just had a look at your desc.txt and the problem was that all the info was on one line instead of seperate lines for each string of info
-RES +FPS
-NUMBER OF PLAYS + NAME OF FILE ( EACH FILE NEEDS ITS OWN LINE AND PLAY COMMAND)
-EMPTY LINE
Hope this helps you shed some light where you had your hiccup.
Also I found its the fps and image size that affects the animation.
If you have a high quality animation (KB/MB not res size) and a high fps it will struggle to render the images and result in sluggish playback. Try optimizing your images to squeeze that little bit extra out.
dully79 said:
Just had a look at your desc.txt and the problem was that all the info was on one line instead of seperate lines for each string of info
-RES +FPS
-NUMBER OF PLAYS + NAME OF FILE ( EACH FILE NEEDS ITS OWN LINE AND PLAY COMMAND)
-EMPTY LINE
Hope this helps you shed some light where you had your hiccup.
Also I found its the fps and image size that affects the animation.
If you have a high quality animation (KB/MB not res size) and a high fps it will struggle to render the images and result in sluggish playback. Try optimizing your images to squeeze that little bit extra out.
Click to expand...
Click to collapse
Thanks bro for your advice. I had the same problem.

Categories

Resources