Coder Social home page Coder Social logo

CrossDomain support about cropit HOT 7 CLOSED

vlatka-sinisa avatar vlatka-sinisa commented on August 15, 2024
CrossDomain support

from cropit.

Comments (7)

scottcheng avatar scottcheng commented on August 15, 2024

Thanks -- this sounds like a useful feature. I added the crossOrigin property to image object here. Would you be able to test if it works for you? Note that you will also need to set headers on the image source server to enable CORS.

from cropit.

vlatka-sinisa avatar vlatka-sinisa commented on August 15, 2024

Thank you. I still need to manage somehow to enable CORS, but what I've seen, you've done great!

from cropit.

scottcheng avatar scottcheng commented on August 15, 2024

The previous change actually didn't work. I updated the code in master in 21294f6 so that you can pass in a allowCrossOrigin option to allow cross origin image source. See 21294f6?diff=split#diff-03b7960c2c30a90d475db93b5af86f7dR23

from cropit.

skitterm avatar skitterm commented on August 15, 2024

I kept getting the "tainted canvas" error until I went in and changed image.crossOrigin = "anonymous" to image.setAttribute('crossorigin', 'anonymous') . Then everything worked.

from cropit.

scottcheng avatar scottcheng commented on August 15, 2024

@skitterm Interesting. Could you share what browser you tested in where image.crossOrigin = "anonymous" didn't work?

from cropit.

skitterm avatar skitterm commented on August 15, 2024

I was in Chrome 42 on windows.

from cropit.

mjaensch avatar mjaensch commented on August 15, 2024

I have the same problem in Chrome 46 on windows.
The crossOrigin=Anonymous didn't work for me.

from cropit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.