dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Images: different behaviour in Test and Device browser

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Images: different behaviour in Test and Device browser

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

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Images: different behaviour in Test and Device browser

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

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Images: different behaviour in Test and Device browser

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Images: different behaviour in Test and Device browser

Hi Gabriele,

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

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Images: different behaviour in Test and Device browser

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

Return to “Issues”