Please don't fix this unless you provide a way to maintain the current non
anti-aliased behavior.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
This sample doesn't look bad in Safari:
http://mrdoob.com/projects/three.js/examples/materials_video.html
I agree with Dean, Chrome shouldn't be different from the rest of the
browsers and should antialias clip().
Too bad that mr. Hickson was against having a antialias boolean. Using
<svg> you can specify whether a shape is renderer with antialias or
without, a shame you can't do the same with <canvas>.
IanODea: Have you considered using the CSS transform attributes? I'm not
100% sure, but I believe that they will show an anti-aliased canvas. It's
not a solution, but it's a work around for some use cases. The WHATWG has
stated without any doubt, that they will not be altering the canvas spec in
relation to anti-aliasing any time soon. Their general attitude seems to be
that SVG should be used in cases where Canvas can't be.
I did try to push this on the WHATWG quite a long time ago, I understand
the issues it brings, and they have been outlined here in this thread.
Using WebGL may be another possible work-around (haven't tried it).
A special HTML / CSS attribute could be added as a means to address this
issue, and keep current functionality.
Would either of these be acceptable to Chromium developers?:
[canvas x-chromium-antialias]
[canvas style="-chromium-antialias: true"]
Just discovered this while trying to figure out why my canvas-drawn browser
action was much more jaggy than the default image I assigned it. It would
definitely be nice to be able to anti-alias.
I've a proposal, for chrome behavior. When a shadow is set, drawImage
should be anti-aliased: This would allow it to keep its current non-aliased
behavior, when a shadow is not set, but would use resampled / aliased
behavior when the shadow is set.
Currently, shadow behavior on drawImage is not defined/implemented, as
stated in issue #11153
Interesting way of having both behaviours, but it it sounds a bit hacky. As
a user I wouldn't expect shadow to change the anti-aliasing of drawImage.
Personally, I don't think there needs to be an option for both, but if we
need one it should be an option on the context rather than the canvas, else
we'll end up with settings that might not make sense (or won't be
implemented) for future contexts.
Eg:
context.antialias = 'nearestneighbour';
// drawing won't be antialiased...
context.antialias = 'normal';
// now it will be (normal should be the default)
This would allow for other kinds of anti-aliasing to be applied, eg
advanced anti-aliasing for text which looks great for static text, but when
animated looks weird as parts of the glyph try to snap to pixels.
(http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/AntiAliasType.html)
Is ever going to be fixed in chrome? I'm basically maintaining two
different drawing code paths because everyone else antialiases drawImage
and chrome doesn't (and requires significant work to even get it looking
half way decent).
One thing to note is that if images are antialiases by default and you
don't want antialiasing you can always floor/round/ceil your non integer
coordinates prior to calling drawImage. The reverse is not possible or at
the very least not possible to do efficiently.
"I'm basically maintaining two different drawing code paths because
everyone else antialiases drawImage and chrome doesn't (and requires
significant work to even get it looking half way decent)."
how can you improve quality of image? i'm storing rotated and clipped
images in separate canvas in memory, and then use drawImage() method.
result is very poor in chrome.
It would be really great to get Chrome in line with the other browsers in
this.
It would be awesome
I recall some other discussion of anti-aliased images inside of canvas on
another bug but now can't find it. bsalomon@ might be able to provide more
color on what the current state of affairs is and whether we're considering
changing anything in the near future.
Hey Brian, has this bubbled up at all? I realize its probably behind a
bunch of performance improvements, just curious if anything's changed.
Comment #37 on issue 7508 by bsalo...@google.com: We don't anti-alias
<canvas> drawImage
http://code.google.com/p/chromium/issues/detail?id=7508
Rob Phillips is starting to make some improvements in how we handle mask
textures. I think a next step for him may be to add support for
soft-clipping using mask textures.
I just want to note that image filtering (or smoothing) is really about how
how images are scaled. The difference we're seeing here between chrome and
FF or IE is how clips are applied. Today we aren't antialiasing the edges
of the clip.
@bsalomon, will Rob be doing any Chrome plumbing of those eventual changes?
Just wondering if I should assign him this bug and how it's going. Thanks,
Hey guys.
It is very important issue for my application, and its a bit disappointing
that other browsers do antialias images in canvas, but my favorite doesn't.
I understand that skiping antialias in images on canvas gives performance
boost, but having a switch for enabling/disabling antialias, would allow
the app to chose what kind of compromise to do would be great.
From what I noticed, currently not only rotated images are
having 'staircase' edges, but also scaled down images look very badly.
We are currently in beta, with lots of bugs, but we are having kind of PPT
clone done with canvas. You can try dropping some images from websearch on
the page, and then use handles to rotate and resize.
http://www.remby.com/try/
The absence of antialias makes these resized and rotated images loose a lot
of their initial quality
wiltzius@, when we come out next week we want to talk to people there about
how best to make it possible to have smooth/aa clipping in canvas2d without
regressing performance in cases where it isn't necessary.
regarding performance - IE9 does perfect anti-aliasing on transformed
images and the performance is as good as it is in Chrome, even better ...
An image smoothing flag seems to have consensus among vendors. The idea is
to pass imageSmoothing = false to scale up pixels without blurring them. I
suggest the default behavior of Chrome be bound to that behavior. So,
people who need those jagged edges for rendering techniques will get them
when they disable image smoothing. The rest of us will get nicely
transformed images.
Comment #43 on issue 7508 by bsalo...@google.com: We don't anti-alias
<canvas> drawImage
http://code.google.com/p/chromium/issues/detail?id=7508
Issue 124756 has been merged into this issue.