Your (rather excellent) trick still works if you make just one single pixel just 1% transparent (so it has 99% of it's colour).
I tried simply giving my file a blank alpha channel (with no transparency on the actual image) but it went back to the banding, you seem to need a least the tiniest amount of transparency for this to work.
As you can imagine having one pixel somewhere in the image with it's opacity turned from 100% to 99% is entirely undetectable.
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
What an odd thing, Tynan, how did you discover that?! :-)
"What an odd thing, Tynan, how did you discover that?!"
Through a very quick test, I wanted to see what was the very least you needed to compromise your image by to still benefit from Rob2's trick.
The answer is - in Photoshop - to make sure your image is a layer (rather than a flattened image) drag a square selection around a single pixel - select the erase brush, set it on 1% (hit 0 then 1 on your keyboard) and then brush over your square . . . . result, super smooth iOS gradients !
You can of course throw all this into an action and stick it on a function key if you like, just drag your image into Photoshop and hit whatever key you have assigned the action to and your banding is gone.
@Tynan where in the settings can I alter the steps for deleting only 1% of transparency ,I use illustrator most of the time,but if this works I,ll export all of my back grounds through photoshop
@Tynan yes my rather obvious 'whole' was for illustration purposes - you just have to ensure 32bit rendering for complex gradients - which in turn ensures 24bits of color An unused alpha channel will just get chucked - somewhere along the line either GS or Apple are reducing our color by a few bits - not good for complex gradients where a thick PC is making color choice. You may even find with less complex gradients that you can get away with 256 color files - good for project size but ultimately not as super efficient as we all once thought.
"ok i finally got this to work,but using a png 24 image for your backgrounds,@ 3x the size as a jpg"
There is no need to make the image any larger that it needs to be, nor is there any reason to save a file as a JPEG, simply save the file at the right size as a PNG.
@Tynan No no what I was saying was,I used jpegs for my backgrounds changing the XML file to accommodate,I got the size of the images down to 48 kb ,but jpgn's have no transparency in them,so now to deal with the gradient situation I have to use png's,and that has increased the size of my images upto 158 kb each,infact some are larger.
Comments
Your (rather excellent) trick still works if you make just one single pixel just 1% transparent (so it has 99% of it's colour).
I tried simply giving my file a blank alpha channel (with no transparency on the actual image) but it went back to the banding, you seem to need a least the tiniest amount of transparency for this to work.
As you can imagine having one pixel somewhere in the image with it's opacity turned from 100% to 99% is entirely undetectable.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
"What an odd thing, Tynan, how did you discover that?!"
Through a very quick test, I wanted to see what was the very least you needed to compromise your image by to still benefit from Rob2's trick.
The answer is - in Photoshop - to make sure your image is a layer (rather than a flattened image) drag a square selection around a single pixel - select the erase brush, set it on 1% (hit 0 then 1 on your keyboard) and then brush over your square . . . . result, super smooth iOS gradients !
You can of course throw all this into an action and stick it on a function key if you like, just drag your image into Photoshop and hit whatever key you have assigned the action to and your banding is gone.
where in the settings can I alter the steps for deleting only 1% of transparency ,I use illustrator most of the time,but if this works I,ll export all of my back grounds through photoshop
Thanks
An unused alpha channel will just get chucked - somewhere along the line either GS or Apple are reducing our color by a few bits
"where in the settings can I alter the steps for deleting only 1% of transparency"
I did this in Photoshop, the method is explained in my post above.
"ok i finally got this to work,but using a png 24 image for your backgrounds,@ 3x the size as a jpg"
There is no need to make the image any larger that it needs to be, nor is there any reason to save a file as a JPEG, simply save the file at the right size as a PNG.
"You may even find with less complex gradients that you can get away with 256 color files"
I am not sure how you are defining complexity here, but yes you are right with most stuff 8bit is fine (surprisingly).
No no what I was saying was,I used jpegs for my backgrounds changing the XML file to accommodate,I got the size of the images down to 48 kb ,but jpgn's have no transparency in them,so now to deal with the gradient situation I have to use png's,and that has increased the size of my images upto 158 kb each,infact some are larger.
I see what you mean now! Sorry I thought you meant 'size' (as in dimensions).
You can use 'Imagealpha' to optimize your PNGs for Gamesalad, you can get great gradianets with 8bit PNGs using Rob2's trick and Imagealpha.
Link (in case you haven't already got it) - http://pngmini.com/