TedisAgolli / remix-conf-profile-pic-generator

remix-conf-profile-pic-generator.vercel.app
3 stars 0 forks source link

Image ratio not honored #1

Open squidpunch opened 2 years ago

squidpunch commented 2 years ago

I'd love to try and find time to fix this as I have build something similar a while back but it was all HTML canvas driven and a bunch more state to retain sizes to scale, etc.

Documenting here in case you have a quick fix, or someone else has time to take a stab (before I dig in)

Currently I have an image 6000 x 4000 that when uploaded it doesnt keep the proper aspect ratio because the preview is set to 400x400

Example starting image DSC01039

Example final image remix-profile-pic

Versus preferred view (after properly adjusting image to be a square ratio square remix-profile-pic (1)

TedisAgolli commented 2 years ago

Hey! Thanks for the very clear report. The current implementation is fairly naive, just sticks the image in a 400x400 tag. Was your manual solution here to just cut 1000 px from each side and then put that in a circle? Another solution could be to let you use the circle to crop out a 400x400 part of the picture.

squidpunch commented 2 years ago

Yeah I just cut the image. I had a project similar where you could zoom, move the image around and then place the added imagery and download. My hope was to try and pull some logic from there for you but I haven’t been able to make time to give it a try

On Sat, May 21, 2022, at 11:23 PM, Tedis Agolli wrote:

Hey! Thanks for the very clear report. The current implementation is fairly naive, just sticks the image in a 400x400 tag. Was your manual solution here to just cut 1000 px from each side and then put that in a circle? Another solution could be to let you use the circle to crop out a 400x400 part of the picture.

— Reply to this email directly, view it on GitHub https://github.com/TedisAgolli/remix-conf-profile-pic-generator/issues/1#issuecomment-1133810334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFGSFYPC4JBUKDE737FUDLVLGSCBANCNFSM5WQTLTMA. You are receiving this because you authored the thread.Message ID: @.***>