matiasgali / guillotine

jQuery plugin to crop images within an area (fully responsive), allowing to drag (touch support), zoom and rotate.
http://guillotine.js.org
327 stars 100 forks source link

Scale not calculating correctly #30

Closed gitn00b1337 closed 9 years ago

gitn00b1337 commented 9 years ago

I noticed you closed the other discussion & I'm new to github so excuse me if you did get my first message.

Can you please clarify how this works because I'm merely looking at the demo & am very confused.

image

image

image

Excuse the third screenshot being in paint, the flipping thing kept screenshotting my wrong screen! :)

Anyway, image #1 shows the original image is size 2509 x 1673 px. The size zoomed to is 1065 x 710 The width & height required is 400 x 300 The frame is 600 x 453px

So surely to get scale it should be...

1065 / 2509 = 0.424 double check with height: 710 / 1673 = 0.424

These are off a little after those decimals, but close enough. Am I doing something wrong? I would hugely appreciate you explaining if so!

On the second screenshot you can see scale is listed as 0.2888.

It is my understanding that the width/height of 400x300 and the x/y positions are used ON the scaled image afterwards? This is hugely giving me grief, any help is really appreciated.

matiasgali commented 9 years ago

@gitn00b1337 considering that you're new on Github, there are a few things that you should know before posting here.

The issue tracker (here) is only meant to report issues, problems or bugs in the repository itself, not for questions. If questions get mixed with actual issues it only makes harder to figure out what really needs to be fixed.

Whenever you attempt to post here Github displays a notice pointing to the CONTRIBUTING file. There you'll find where you can require assistance or ask questions about this repository.

Give it a try to any of those and I'll be happy to help.