After image rotation with php I get jagged edges -


so rotate image php , make background transparent. problem jagged edges. there way anti-alias edges?

i'm using http://www.exorithm.com/algorithm/view/rotate_image_alpha code find let me have transparency background

i don't have solution jaggies produced php's rotation, but....

you haven't stated you're doing rotated images once they've been rotated? displaying them on web site?

if that's you're doing, may suggest consider letting browser rotation css.

the following stylesheet code work current browsers (including older versions of ie):

.tilted {   transform: rotate(45deg);  /* css3 (for when gets supported) */   -ms-transform: rotate(45deg);   -moz-transform: rotate(45deg);  /* ff3.5+ */   -o-transform: rotate(45deg);  /* opera 10.5 */   -webkit-transform: rotate(45deg);  /* saf3.1+, chrome */   font-weight:bold;   filter: progid\:dximagetransform.microsoft.matrix(sizingmethod='auto expand', m11=0.7071067811865476, m12=-0.7071067811865475, m21=0.7071067811865475, m22=0.7071067811865476); /* ie6,ie7 */   -ms-filter: "progid:dximagetransform.microsoft.matrix(sizingmethod='auto expand', m11=0.7071067811865476, m12=-0.7071067811865475, m21=0.7071067811865475, m22=0.7071067811865476)"; /* ie8 */ } 

(that's 45 degree tilt; feel free modify other angles, though you'll have recalculate radians ie6/7/8 filters yourself!). may need make other tweaks working yourself, setting height , width, etc, other css styles should continue work normal this.

now don't need have php hard work; browser can it. better, because it's in browser, can stuff change rotation on fly javascript.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -