How to customize image size when using blueimp-gallery lightbox? - image-size

I'm using http://blueimp.github.io/Gallery/ in a bootstrap environment.
It works with my images but the modal window which shows the full size image is not large enough for me. It takes only one-third of my screen width.
You can see a live-example here:
http://www.randspringer.de/mannschaftsaufstellungen/1.html
How can I customize the size of the displayed full image?

You could either add
data-use-bootstrap-modal="false"
to the lightbox container, which displays the images borderless and fullscreen
or adjust the size of the modal according to the bootstrap documentation:
http://getbootstrap.com/javascript/#modals-sizes

Related

How can I make the ImageEditor's zoomToFit work so that I use the available screen space?

I want to use a sap.suite.ui.commons.imageeditor.ImageEditor control inside a sap.m.WizardStep.
After loading the image I want to use the zoomToFit method of the control to resize the image and use a maximum of the available screen space: 100% width and the height maximized to what's left available in the WizardStep without adding scroll bars.
I created a sample to show the challenge: https://plnkr.co/edit/9GhXbOzuIqP6VxqS?preview

How to resize the PNG file?

I have a PNG file for banner. I want to resize the banner image to smaller. When i try with paint the resolution is going wrong and the content is not visible clearly. Can anyone please help me on this
Banner Image
If on Photoshop for Mac or Windows:
Go to Menu bar, click Image.
Select Image Size.
Change width and height.
Tip 1: You can also use a shortcut. for Mac: Option + Command + I. For Windows: Shift + Control + I.
Tip 2: In the menu for changing width and height, it is useful to keep the aspect ratio by selecting or unselecting the icon that looks like a chain.
Try using something like Brice Lambson's Image Resizer, it's small (less than 200kb), very simple to use, and it resizes images just fine.

Adding custom width hieght if fancybox opened svg image

Im using fancybox popup for images. I want to check if a loaded image is svg then assign custome width height for overwirte actual size of a image.pls advice
Simply use this demo https://codepen.io/fancyapps/pen/rYQogO?editors=1010 (from the docs) as an example. This is how you can check current source - current.src

jcrop show image in modal dialog for cropping size issue

I am showing the image which is uploaded by user in a modal dialog. On this image I am initializing JCrop for cropping the image.
The problem is that I am not able to set the image properly in the dialog, it works ok for images whose size (dimensions) is less than dialog size but for images bigger than dialog size, the image is going out of the dialog.
I tried using boxHeight and boxWidth but this make image non responsive and for smaller size screen the image is going out the dialog.
Basically I am looking for generic solution of showing image in a dialog no matter the image size so that it is displayed properly inside the dialog.
Use this may help :
<div class="modal-body" style="overflow: auto; >
......preview here ....
</div>
The easiest solution is to initialize jcrop in a fixed size div using jcrop option as follows:
boxWidth: 500,
boxHeight: 500,

jQuery Mobile/ jqTouch Image width

I want to have a static footer image with 5 buttons for navigation in my mobile phone website. The image is here http://www.pintum.com.au/jm/footer3a.jpg. The blue icons should be the default, the yellow icon should only be visible for the hover or active state.
I want to know how can I make this image scale to the correct width on all mobile devices (landscape and portrait) and have links to other pages and make the current/active pages icon the yellow color?
What I have tried so far
I first tried to make a CSS Sprite but that go ugly (complex) quickly. Painful working with widths everywhere so the image scales correctly as I had no way of knowing the height in pixels since the width is dynamic. I could use JS to find the width and calculate height on the fly. But this sounds like overkill.
Next I tried to have a single image with a width of 100% then place div overlays on top of the image. But with this solution I could not figure out how to navigate pages using JavaScript click event, or figure out how I would be able to change the image icon on the selected page http://jsbin.com/uraya5/3/ . And detrmining the correct height for the div
Last I tried to make each button a seperate image. These seems like the easist soultion. But jQuery Mobile adds a bunch of extra styles to the button I do not know how to remove. See http://jsbin.com/uraya5/4
So whats the best/easiest way to do this?
How can I remove the style around
links?
Or can I use a single image CSS sliding door method? To reduce HTTP request.
Ok I figured it out
See soultion here http://jsbin.com/uraya5/10/
I had to:
Set width to 19% of each button for
some reason there is spacing between
each button so 20% does not work.
Set ui-bar-a background to black so
it hides the spaces between my
images
Use this JS code to navigate pages $.mobile.changePage($("#about"),
"flip", true, true);
I would still like to use a single image instead of having 5 different images to reduce http calls. So if anyone finds a eligant soultion for this please let me know.