Getting black image after crop.
See original GitHub issueHi,
I am getting “solid black” image after passing it through the getCroppedImg()
function provided by the docs. The dimesions of the returned image is correct, however all I see is solid black color.
const reader = new FileReader();
const imageObject = new Image();
reader.readAsDataURL(fileObject);
reader.onload = () => {
imageObject.src = reader.result;
};
const croppedImageBlob = await getCroppedImg(imageObject, crop, fileObject.name);
console.log(URL.createObjectURL(croppedImageBlob)); //Pasting the URL in the browser shows a solid black image
Any help is appreciated. Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Photoshop Goes Black When I Crop - 12441694
I go to crop an image. When I hit return, the whole screen goes black. I notice in the Properties panel on the...
Read more >After crop image , it is black - Stack Overflow
1 Answer 1 ... $img_r = imagecreatefrompng($src);. what is $src ? its empty as i see it in your code, so your image...
Read more >unwanted black line after crop on bottom and right side of photo
Hi, since i am using el capitan 10.11.1 with Aperture 3.6 using the crop tool, my photos get an unwanted thin black linearound...
Read more >Black line when crop is close to border [#2998770] | Drupal.org
This effectively causes a 1-2px black border in the cropped image. See attached image: This should best be checked after the posting of...
Read more >Crop a picture in Office - Microsoft Support
Select the Crop button. Black crop handles appear on the edges and corners of the picture. Cropped Image. Crop the image by doing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Final react component code with the problem solved: https://gist.github.com/norflin321/c8ce39f3fff2e73b7bc30b216b482a85
Thanks for the gist, closing as the issue is old and from a major version ago