Page 1 of 1

Images: different behaviour in Test and Device browser

Posted: Tue Feb 18, 2014 3:39 pm
by dibe84

Hi, I built a page that loads a picture and then, through a slider, is possible to adjust the quality of the image taken.

The page works perfectly into the laptop browser simulator (chrome) but, when I try to execute it from the device the behaviour is strange: the image is half black and looks stretched!

I'm using exactly the same file, take a look to the screensthots:

Simulator:

Image

Device (Chrome, Safari and Appery.io tester have the same behaviour)
Image

To resize the image i'm levereging the "canvas" browser feature (http://clientside-resize.labs.liip.ch/) and it works fine if i'm using a "static" image (loaded as an asset in appery) instead of a dynamically loaded one.

Do you have any idea of what's wrong?


Images: different behaviour in Test and Device browser

Posted: Tue Feb 18, 2014 5:57 pm
by Maryna Brodina

Hello! Please take a look here and let us know if this post helps https://getsatisfaction.com/apperyio/...


Images: different behaviour in Test and Device browser

Posted: Wed Feb 19, 2014 8:16 am
by dibe84

Thanks a lot Maryna, it seems exactly what i was searching for! I'll test as soon I have time.

It could be possible to also add a progress bar that indicates the status of the upload?

Gabriele


Images: different behaviour in Test and Device browser

Posted: Wed Feb 19, 2014 3:15 pm
by Kateryna Grynko

Hi Gabriele,

Here is how to use spinner: https://getsatisfaction.com/apperyio/...


Images: different behaviour in Test and Device browser

Posted: Wed Feb 26, 2014 3:41 pm
by dibe84

Katya, Maryina,

Thanks a lot for the information! It was exactly what I was searching for!!!

I have another question: I'm trying, once selected the picture, to keep the original rate between width and height.. how can I do that with the canvas?

Gabriele


Images: different behaviour in Test and Device browser

Posted: Wed Feb 26, 2014 5:53 pm
by Kateryna Grynko

Hi Gabriele,

You can calculate a coefficient c=height/width, and then change size this way: width = widthn and height considering coefficient heightn*c


Images: different behaviour in Test and Device browser

Posted: Thu Feb 27, 2014 11:32 am
by dibe84

Thanks a lot,
I implemented the solution you suggested me and works great!!