Coder Social home page Coder Social logo

Canvas instead of image about vue-advanced-cropper HOT 6 CLOSED

a0s avatar a0s commented on August 14, 2024
Canvas instead of image

from vue-advanced-cropper.

Comments (6)

Norserium avatar Norserium commented on August 14, 2024

@a0s, I don't see currently any straight ways to implement that, but I want to understand what do you want to develop. Something like this?

from vue-advanced-cropper.

a0s avatar a0s commented on August 14, 2024

@Norserium I am developing some sort of online image editor. It works like a stack of modifications for basic image. It operates on OffscreenCanvas'es. Every change of modifier leads to real-time recalculating of final image (i draw final OffscreenCanvas to real html Canvas).
So, now i need to integrate briliant vue-advanced-cropper into my project (i need visual handler of crop operation mostly, not cropping action itself), I already tried to render canvas into blob than save it as dataUrl jpg/png/webp whatever, but it was deadly slow for some reason. Something inside vue-advanced-cropper doing very slow initialization during picture change, also some slow animations... But i dont need any animations, just as fast as possible updating. I tried to switch animations off with no big success.

So my idea is

  1. rewrite Cropper to good typed code with no warnings/errors from IDE. I started from 500+ errors, now its 100 left only. Ofc , most of errors were pretty easy like a replacing this.smth to smth.value or props.smth.
  2. then, i am going to throw out everything related img and replace it with OffscreenCanvas. With well-typed code and hints from the IDE, this shouldn't be a big deal. Unfortunately the source code is not as well typed as I would like and there are many dubious places..

from vue-advanced-cropper.

Norserium avatar Norserium commented on August 14, 2024

@a0s, in other words, do you want to make something like this editor?

from vue-advanced-cropper.

a0s avatar a0s commented on August 14, 2024

I saw it. Any editor is sort of any another editor. I don't see how your editor's source code can help me, due its still using img as the source but not the canvas.

hmm but maybe https://advanced-cropper.github.io/react-advanced-cropper/docs/tutorials/image-editor/#custom-background-component could be helpfull, will check it, thank you!

from vue-advanced-cropper.

Norserium avatar Norserium commented on August 14, 2024

@a0s, it's the react cropper, but it will be ported to Vue sometimes as a new major version.

I saw it. Any editor is sort of any another editor. I don't see how your editor's source code can help me, due its still using img as the source but not the canvas.

It uses canvas under the hood as the source. The img element presents also, but it not used by the cropper directly, I just use it to draw the image on the canvas.

from vue-advanced-cropper.

a0s avatar a0s commented on August 14, 2024

@Norserium Sounds like a solution for my question! I'll definitely test it when it becomes available.

from vue-advanced-cropper.

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.