Questions tagged [react-image-crop]

42 questions
7
votes
2 answers

Scaling Image To Fit Certain Dimensions and Keep Aspect Ratio SwiftUI

I understand that it is impossible to use the .scaledToFit() modifier on an image with a frame of 120 and 430, with a frame modifier like .frame(height: 100, width: 100) and expect the image to somehow keep the aspect ratio and fit the frame of…
4
votes
0 answers

Is there any good way to connect react-image-crop with react-dropzone?

I've been trying to connect react-image-crop with react dropzone, but it's just doesn't seem to work, or i am doing something really wrong. that's my drag and drop component import { useDropzone } from 'react-dropzone'; import React, { useMemo,…
dlyzo
  • 128
  • 1
  • 10
3
votes
1 answer

ReactCrop preview not rendering

I wanted to implement an image cropping feature for my web application and came to know that react-image-crop is the best npm package to implement the same. But, for some reason, the preview that the ReactCrop component provides is not getting…
CSS-Romeo
  • 145
  • 7
3
votes
4 answers

How can I crop an image on the client side without losing resolution using React

I'm trying to crop an image in a react application. I'm currently using a library called react-image-crop but it seems the cropped image is exactly the same size of crop area on the browser, means if I resize my browser window, the same area of the…
nightograph
  • 2,179
  • 5
  • 31
  • 49
2
votes
0 answers

react-image-crop: unable to convert cropped image from canvas & set it as file input val in form

How do I get the cropped image from canvas with DominicTobias/react-image-crop, and set it as file input value for a form to submit to backend? I followed this tutorial:…
yeln
  • 462
  • 2
  • 10
  • 23
2
votes
1 answer

react-image-crop: Failed to execute 'drawImage'

I am trying to crop an image using 'react-image-crop' package and set the output into result variable. import React, { useState } from 'react' import ReactCrop from 'react-image-crop' import 'react-image-crop/dist/ReactCrop.css' export const…
user15361826
  • 322
  • 2
  • 13
2
votes
1 answer

react-crop-image error in converting canvas to blob

I would like to create a module in my site about cropping the image of an article. I am using the react-crop-image. I am having a problem on converting my canvas to blob. I am getting an error of SecurityError: Failed to execute 'toBlob' on…
Jc John
  • 1,799
  • 2
  • 34
  • 69
1
vote
1 answer

Reactjs: How to use drawImage

In my project, using react-image-crop package to crop images. But which provides some errors import React, { useState } from 'react' import ReactCrop from 'react-image-crop' import 'react-image-crop/dist/ReactCrop.css' export const Imagecrop =…
user15361826
  • 322
  • 2
  • 13
1
vote
2 answers

In react-image-crop npm package, onImageLoaded is not working? How can I set url of an image as always I get null, due to not working of onImageLoaded

I want to add crop image functionality to my project. So for that, I am using the react-image-crop npm package. I read the documentation and write code but still, I am getting an error. When I select an image from my pc then it should appear on…
Abdul Sammad
  • 127
  • 1
  • 8
1
vote
1 answer

Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported in react-image-crop

I am using the react-image-crop npm module for cropping of images. It is working fine when I passed my system image as props to it but when I passed an URL of the image coming from the back-end then this module shows an error. "Failed to execute…
Pranay kumar
  • 1,983
  • 4
  • 22
  • 51
1
vote
0 answers

Image displayed as white in react native

I am using react-native-image-crop-picker to upload images from my device to the backend server. I am able to upload and save images to the server successfully. But If I sign out from my application and sign in back, the image filed is showing as…
1
vote
1 answer

react-native-perspective-image-cropper outside of image crop add white background in IOS

I use react-native-perspective-image-cropper package to crop image dynamically, and it’s work absolutely fine. But sometime when the cropping area overlay are outside of the image and I try to crop the image then it add the white background to…
1
vote
1 answer

How can the user crop the picture completely freely

I have a question about the image_cropper plugin... I want the user to be able to crop the photo himself and not have to use the preset options (3:2, 4:3, 16:9, ...), but I find no instructions how this works. I've seen it work on the internet, but…
SOS video
  • 436
  • 9
  • 21
0
votes
0 answers

Using react-image-crop cropping the zoom in image

I am using react-image-crop for cropping the image and I have implemented the zoom on the image. now I want to crop the Zooomed in image but when I try to crop the image it crops the original image, not the zoomed-in image. any help would be…
0
votes
0 answers

react-image-crop not cropped image properly

I am using react-image-crop to cropped my images and show the final result. when I am try using below code then my image not render properly but if I am try this code…
1
2 3