josealejandro2928 / react-image-picker-editor

React library for the selection, edition and compression of images in png, jpeg and webp formats This package is made completely with html and css without any extra components or npm packages. It's based in functional components based in hooks, for optimization were used memo, useMemo and useCalback for avoiding any extra-renders.
https://www.npmjs.com/package/react-image-picker-editor
MIT License
27 stars 21 forks source link

There seems to be a small bug with the jpeg format #1

Closed DaanBiesterbos closed 2 years ago

DaanBiesterbos commented 2 years ago

Impressive work! šŸ‘

I noticed that when I select jpeg and download the file I get a jjif file. Seems to be a small bug?

Also, when using the cropper with aspect ratio enabled, I would expect the aspect ratio to apply to the cropping area. As is the case here: https://jamesooi.design/Croppr.js/ Right now the aspect ratio seems to be related to the viewport I think? Just a suggestion.

Thank you for sharing.

Daan

josealejandro2928 commented 2 years ago

Thanks for your comment, I just tried to reproduce the jpeg format problem, but it never seems to happen, I try in Mozilla and Chrome but the image always downloads fine. With respect to the crop, right now it disconnected from the aspect ratio part. I just crap the image inside the square of the cropper. Here some screenshots.

Screenshot from 2022-04-01 06-00-11

Screenshot from 2022-04-01 05-48-15

Screenshot from 2022-04-01 05-48-39

josealejandro2928 commented 2 years ago

I have reimplemented the cropper, now it's better, and works pret well on mobile. I haven't seen any problem with the download feature. Thanks for your feedback.

DaanBiesterbos commented 1 year ago

Hmm I was working on my Windows laptop. I was using Chrome or Edge. I did try to switch to png (that worked) and then back to jpeg and I got the jjif again. I will see if I can reproduce the issue later tonight. I will check out the console log. Perhaps it is a browser thing.

Op vr 1 apr. 2022 06:04 schreef Jose Alejandro ConcepciĆ³n Ɓlvarez < @.***>:

Thanks for your comment, I just tried to reproduce the jpeg format problem, but it never seems to happen, I try in Mozilla and Chrome but the image always downloads fine. With [image: Screenshot from 2022-04-01 06-00-11] https://user-images.githubusercontent.com/37028825/161192849-951de177-d5da-4847-8af9-6f14d0d91e49.png [image: Screenshot from 2022-04-01 05-48-39] https://user-images.githubusercontent.com/37028825/161192855-6a6caa3b-c8b0-40a6-879c-ea6b4cd462cd.png [image: Screenshot from 2022-04-01 05-48-15] https://user-images.githubusercontent.com/37028825/161192860-a66efef6-7f2a-4ea5-8a79-d76c45ca3386.png respect to the crop, right now it disconnected from the aspect ratio part. I just crap the image inside the square of the cropper.

ā€” Reply to this email directly, view it on GitHub https://github.com/josealejandro2928/react-image-picker-editor/issues/1#issuecomment-1085394767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5OCBF2OAWJNPMHDOUBO5LVCZYUDANCNFSM5SHCEH7A . You are receiving this because you authored the thread.Message ID: @.*** com>