Maintain the aspect ratio(Landscape/Portrait) of images clicked by device's camera - jssor

Got stuck in a issue with creating responsive slider. I have created slider and it's working fine. What is the issue is I am making slider for images clicked by camera.
There is a button under slider which clicks new image and then store that image in Database using SQLite and then It will fetch that images from Database and add into the slider.
It works fine with Landscape images clicked by camera. I'm getting portrait images clicked in slider but it's stretching the image with the width of slider. I want to know that how to maintain ratio of images in slider as I clicked.
Thank you.

in your jssor slider options change $FillMode:
$FillMode: 1 //1 contain (keep aspect ratio and put all inside slide)
you'll find an example on the official website here: http://jssor.com/demos/different-size-photo-slider.slider

Related

How to rotate an image of CachedNetworkImage in flutter?

It's flutter app. It's an app with portrait-only mode.
I want to show some images of my product. When user touches the image,
I would like to show it on full screen using CachedNetworkImage.
But the problem is, when width is bigger than height, Boxfit.cover only shows middle part of image (left and right side not shown). If I make it dispaly all picture, then there'll be so much empty space above and below
I would rather to make the image(CachedNetworkImage) rotate 90 degree, so that whole image can fit the full screen.
Any idea?

Making a panel stretch to the size of the canvas and then back to its previous size like a "maximize" button in Unity

I've figured out how to make the maximize portion of this work using the aspect ratio built in function on a button to scale a panel up to the full size of the screen. Haven't been able to find anywhere how to get it to back down to its previous size.

Image Stretch in Unity when using for Sniper Zoom

I am trying to making a sniper zoom using unity. When user zooms i want to show
Sniper Scope image.
I simple place the image in Unity Image Component.
Here is the image example
The image stretches like this.
How can i maintain the aspect ratio. There is once option for saving the aspect ratio but then it removes background from top and bottom

Hide thumbnails in jssor silder

I am using jssor slider .I have a requirement, I used images gallery with thumbnails . When clicked on external button thumbnails should hide and image should align centre in slider and arrows should align left and right to slider.
If you know how to set slider height and width according to window size please help me.
Your slider is made of 'outer container', 'slides' container and 'thumbnail navigator' container. You can adjust layout dynamically.
Refefence: http://www.jssor.com/development/tip-arrange-layout-adjust-size.html
You can scale the slider while window resizes, please note that jssor slider always keeps aspect ratio.
Reference: http://www.jssor.com/development/tip-make-responsive-slider.html

Displaying an image over another image along with transition

I have a welcome screen which displays an image using label as background.
Now, I want to and I'm trying to display an icon upon this background image with transition.
So, once the icon transition over the background image is done, I should be able to see the background image and the icon displayed in one screen.
Is it possible? How should I do it?
This is possible in Codename One using layered layout, I don't recall if we added it to LWUIT or later on as we forked to Codename One.
Failing that just set the image as the bgImage and then just place the other image on top.