Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get updated loadedImage after flip/rotate ? #669

Closed
davidquintard opened this issue Jan 12, 2025 · 0 comments
Closed

How to get updated loadedImage after flip/rotate ? #669

davidquintard opened this issue Jan 12, 2025 · 0 comments

Comments

@davidquintard
Copy link

davidquintard commented Jan 12, 2025

Hi,
I'd like to know how to get updated loadedImage (File type) after flip/rotate ?
Here is what i did but i don't know if it's the right way.

async imageLoaded(image: LoadedImage) {
    await this.rotate(image);
  }
async rotate(image: LoadedImage) {
    const objectUrl = image.transformed.objectUrl;
    let blob = await fetch(objectUrl).then(r => r.blob());
    const imageFile = new File([blob], "file", {
      type: "image/png",
    });
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant