meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

Not running properly in Opera 11 #8

Closed meltingice closed 12 years ago

meltingice commented 13 years ago

When running in Opera, it either doesn't do anything or it majorly messes up rendering and creates really strange results.

patrickhlauke commented 13 years ago

i can't comment on the "doesn't do anything" bit - has been working for me when doing light testing. however, the strange results (weird colours etc) are due to the change in the canvas 2D spec about setting pixel array values. old behaviour (which all other browsers are still using) was to clamp/round values (for values below 0, clamp to 0; for those above 255, clamp to 255). this has since been changed - see http://html5.org/tools/web-apps-tracker?from=4490&to=4491 and http://www.w3.org/Bugs/Public/show_bug.cgi?id=8405 - to match WebIDL, meaning that the numbers are effectively modulo'd. for instance, a value of 260 modulo 255 will result in a value of 5 being set. opera is, to my knowledge, the only browser that follows the currently accurate spec, but all others still refer to the outdated clamping. full disclosure: i work for opera in the developer relations team...

meltingice commented 13 years ago

Hmm... I fixed the clamping issue, and Opera now works great whenever a single modification on an image is applied. However, with the preset filters that use multiple effects, there still seems to be a problem. Going to have to investigate further when I have some free time.

Thanks for the info!

iandevlin commented 12 years ago

I'm still seeing the same thing where many of the preset examples (http://camanjs.com/examples/presets) render as blank canvas images on Opera 13.0.1.

Shame to see that this isn't fixed.

patrickhlauke commented 12 years ago

admittedly, the issue with presets may be a fault in Opera's JIT...not 100% sure. also, as luck would have it (can you say "living standard"?) the clamping decision was reversed in HTML5.