1


First, i'm french and i'm sorry in advance for mistakes.
I have a cover photo displayed before sending the form.
The person can reposition the image , zoom , etc.
Script : https://github.com/matiasgagliano/guillotine exemple in french

The problem is that i don't know how to send the new image resized and not the default image. The API has set a function to get info about image :

var data = picture.guillotine('getData');

but i don't where how use this and where. I'm a beginner in JS.

Thanks much.

5
  • what have you done so far ? Commented Apr 8, 2016 at 10:16
  • Good question. I have not tried yet, but I suggest you look at this: stackoverflow.com/questions/2434458/… Commented Apr 8, 2016 at 10:17
  • and this Q&A also looks promising stackoverflow.com/questions/23945494/… Commented Apr 8, 2016 at 10:18
  • @NimS I tried to change value of a hidden input when the image is resized, but doesn't work. Commented Apr 8, 2016 at 11:47
  • @fiprojects I will look at this, thks Commented Apr 8, 2016 at 11:48

1 Answer 1

1

I'm an idiot.
I put that code into the dragging function.

var data = picture.guillotine('getData');
getID("scale").value = data.scale;
getID("x").value = data.x;
getID("y").value = data.y;

The values 3 hidden inputs are used to resized the image in PHP with gb librairy

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.