w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Can't clip the image (css)
The shape you are applying is 0px width, 0px height The clip applies: rect(<top>, <right>, <bottom>, <left>) As you have the top and the bottom equal as well as the left and the right equal then there are no pixels to display. Your cut goes from: Horizontally: 15px to 15px == 0px to display Vertically: 35px to 35px == 0px to display Reference

Categories : CSS

When iOS shrinks an image, does it clip/pixelate it?
It is always best to make the images of correct size from the beginning. All resize-functions will have negative impact on the end result. If you scale it up to a larger image it will be a big different, but even if you scale it down to a smaller it is usually creating visible noise in the image. Let's say that you have a line of one pixel in your image. scale it down to 90% of the original size, this line will just use 90% of a pixel wide and other parts of the images will influence the colors of the same pixels.

Categories : IOS

Adding more than one frame one below the other of movie clip to the VBOx container?
If anyone of you ever got stuck at cloning a movie clip. Then you should visit this page. http://www.dannyburbol.com/2009/01/movieclip-clone-flash-as3/

Categories : Actionscript

Run a Docker Image as a Container
The specific way to run it depends on whether you gave the image a tag/name or not. $ docker images root@dockertest:~# docker images REPOSITORY TAG ID CREATED SIZE ubuntu 12.04 8dbd9e392a96 4 months ago 131.5 MB (virtual 131.5 MB) With a name (let's use ubuntu): $ docker run -i -t ubuntu:12.04 /bin/bash Without a name, just using the ID: $ docker run -i -t 8dbd9e392a96 /bin/bash Please see http://docs.docker.io/en/latest/use/basics/#running-an-interactive-shell for more information.

Categories : Docker

HTML5 image in .nav container positioning.
Try setting the left property of the background image. In my experience, if you mess with the container then it will mess with everything else. Also, you might have to tinker with the actual image to get it look right.

Categories : CSS

Checking if image has left its container?
It's not enough to check if the image is out of the box at document.ready. You can use the progress function on animate to get notified about every step of the animation. Then you include your check in that function (DEMO). $(document).ready(function() { var stage = $(".gallery"); var stageoffset = stage.offset(); var stageleft = stageoffset.left + 600; var lastimage = $("img:last"); function gallery () { $("#image").animate({"margin-left":"+=100px"}, {duration: 1000, easing: "linear", progress: checkBox}); } var interv = setInterval(gallery, 1000); function checkBox() { if(!(typeof lastimage.offset() === 'undefined')) { var imageoffset = lastimage.offset(); var imageleft = imageoffset.left;

Categories : Jquery

Image won't stretch container width
It is bad practice to scale images using the browser like that as it tends either to create extra overhead (unnecessarily large file size/resolution), or a bad user experience (pixelated low res image due to upscaling or incorrect aspect ratio). That being said, you are only setting the max-width of img in your CSS. Have you tried setting the width: 100% too? If that doesn't work on its own, also try adding float: left; to .top-sidebar img

Categories : CSS

IE8 scale image to fit container with ms-filter
Hmm figured it out. When adding "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bg+"', sizingMethod='scale')" it works... Very strange! I've thought that IE8 only requires -ms-filter.

Categories : Jquery

QT QLabel (used as an image container) fullscreen bug
You're probably doing it in some wrong way, but you don't show the code, so how can we know? Below is a safe SSCCE of how one might do it. Works under both Qt 4.8 and 5.1. Nitpick: The status bar should not be a part of the centralWidget()! QMainWindow provides a statusBar() for you. The only safe way of passing images between threads is via QImage. You can not use QPixmap anywhere but in the GUI thread. End of story right there. In the example below, all of the important stuff happens behind the scenes. The DrawThing QObject lives in another thread. This QThread's default implementation of the run() method spins a message loop. That's why the timer can fire, you need a spinning message loop for that. Every time the new image is generated, it is transmitted to the GUI thread by implic

Categories : Qt

Using a larger image than container for better quality with css
yes you can do this by background-size property but you need to remove that background position or make it 0px 0px from left and top respectively. This property will not be functional below IE9.

Categories : CSS

Resizing Background image according to container Div
There's many different ways to do this. The best in terms of execution speed is to use CSS, but jQuery can accomplish anything CSS can using the $().css() method. Here's a fiddle with four five different methods, from just putting the image in, to stretching in css and jQuery. The code is below: <style> div { background-image : url("http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Les_Halles_%28metro_de_Paris%29_-_Entree.jpg/800px-Les_Halles_%28metro_de_Paris%29_-_Entree.jpg"); height : 200px; width: 200px; margin: 10px; background-repeat : no-repeat; background-color: blue; float: left; } #one { background-size:contain; } #two { background-size: 100%; } #three { background-size: 100% 100%; } </style> <div id="one">

Categories : C#

HTML/CSS to make an image container the same size as those next to it
You can use table and table-cell display. jsFiddle Demo .row { display: table; } .col-xs-4 { display: table-cell; float: none; vertical-align: bottom; }

Categories : Javascript

Using CSS to make image size 100% to height of container
Try this with Jquery imagescale: <img id="img1" src="myimage.jpg"> $(document).ready(function(){ $('#img1').imgscale({ parent : '.parentcontainer', fade : 1000 }); }); keep remember define your parent container width and height first as: .parentcontainer { height: 100%; width: 100%; }

Categories : HTML

centering image vertically in fluid container
Set the height of B to the same height as A, then set the top margin of the image to the container height minus the image height divided by two : var h = $('#A').height(), img = $('#B').height(h).find('img'); img.css('margin-top', (h-img.height())/2); FIDDLE EDIT: to make sure the image is loaded, you can use this trick: $('img', '#B').one('load', function() { var h = $('#A').height(); $('#B').height(h); $(this).css('margin-top', ( h - $(this).height() ) / 2); }).each(function() { if(this.complete) $(this).load(); }); EDIT AGAIN: if you have to wait for more content to load, do: $(window).on('load', function() { var h = $('#A').height(), img = $('#B').height(h).find('img'); img.css('margin-top', (h-img.height())/2); });

Categories : Javascript

Div Container with repeat background image and floating div
Add overflow: hidden; to main_body example #main_wrapper { width: 1000px; margin: 20px auto; text-align: left; } #main_body { background: url(Body1000.jpg); background-repeat: repeat; text-align: center; width: 1000px; overflow: hidden; } #leftside { float: left; width: 200px; height: 300px; margin: 10px; }

Categories : HTML

How to align an image and a navbar inside a container?
You could try to float left your img and your div tag as follow : <header> <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container" style="overflow: auto; "> <!--company logo and slogan--> <img src="img/logo.png" style="float: left; " alt="logo" /> <!--Nav bar--> <div class="nav-collapse collapse" style="float: left; "> <ul class="nav pull-right" > ... </ul> </div> </div> </div> </div> </header> That should make them show at the same level.

Categories : HTML

Align image to bottom of responsive container
<div class="container"> <div class="content"></div> <div class="floatbottom"></div> </div> and set the css for content, height as auto; and container height also auto

Categories : CSS

How can I wrap text around an image in the bottom right of its container?
Try this http://jsfiddle.net/A26bG/: #teaser-cell { width: 180px; } #teaser-cell .link-button { display: inline-block; width: 35px; height: 35px; background: url(...) 70px; float: right; } <div id="teaser-cell"> <span>Teaser 1</span> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <a class="link-button" href="#"></a> </p> </div>

Categories : CSS

Storing and Retrieving Image Path From android application folder On Pre Created SQLite Database & Setting the image to Image View
I would only save the image name in the db and then get the resource identifier with context.getResources().getIdentifier(). Check out this similar question.

Categories : Android

A better way to float text on top of an image with varying container widths
I know that you wanted to not use background-image, but here is a solution which uses that for anyone else who sees the page. Perhaps your slider could make use of the background-image? This should do it: jsFiddle HTML <body> <div class="header"> <div class="content-wrapper"> header text </div> </div> <div class="banner"> <div class="content-wrapper"> <div class="banner-text-outer"> <div class="banner-text-inner"> <h2>banner text header</h2> <p>banner text paragraph</p> </div> </div> </div> </div> <div class="main-content">

Categories : HTML

stop image from moving when reaching the border of a container
Try this: http://jsfiddle.net/ps4t9/11/ $(document).ready(function () { var player = $("#Player"), shuriken = $("#Shuriken"), container = $("#Container"), w = container.width() - shuriken.width(); $(window).keydown(function (e) { if (e.which == 38) { if (parseInt(player.css('top')) > 10) { player.animate({ top: '-=20px' }); shuriken.animate({ top: '-=20px' }); } } // up if (e.which == 40) { if (parseInt(player.css('top')) < 270) { player.animate({ top: '+=20px' }); shuriken.animate({ top: '+=20px' }); } } // down if (e.which == 32) { if (shuriken.css('left') != '249px') { shuriken.animate({ 'left' : '+=280px' }); } } }); }); It breaks when holding down the

Categories : Javascript

Fully cover the container using a proportionally scaled image
Use a background image with the CSS3 attribute background-size: cover http://jsfiddle.net/UUhVf/ You can adjust the positioning with the background-position attribute

Categories : CSS

Menu outside container / Background image vertical stretch
To fix the extra 10-15px spacing issue, add padding:0; to ul.nav As for the repeating background of div, add the two lines that you used to do the same thing in body to it: add background-repeat: no-repeat; background-attachment: fixed; to div's CSS jsFiddle with the implemented changes

Categories : Image

How to center crop an image () in fluid width container
When It Works You might have a container that holds some content such as two <div>s that are 50% wide each, sitting next to each other. For this example, we can illustrate just one child of the container: We'll name outer rectangle .container, the inner rectangle .content and the image img. This arrangement is perfectly fine, as long as .content is always wider than img. When It Breaks Since we're dealing with percentages and probably working with a responsive design, this may not always be the case. If .content is ever thinner than img, cropping will occur: The Problem If the most interesting part of img is in the center, we need to get the browser to crop both edges evenly - leaving the best part of it visible, no matter what width of .content is. The Solution Fortuna

Categories : CSS

if you know an image's dimensions, how do you scale it without a reflow in a fluid container
I think you may just be looking for overflow: hidden on the div. The only down side is if you expand the image too much it won't fit in the div. div { width: 50%; background-color: red; overflow:hidden; }

Categories : CSS

Click links to load the relevant image into a container
$(function () { $("a.click").click(function (event) { //hide panel in case it's already visible because of a previously loaded image $("#hiddenPanel").fadeOut(0); //disable default link click event so page does not change if link has a href event.preventDefault(); //set links src to the src of image in the hidden panel $("#hiddenPanel img").attr("src", $(this).attr("src")); $("#hiddenPanel").fadeIn(1000); }); $("#closeButton").click(function () { $("#hiddenPanel").fadeOut(1000); }); }); FIDDLE You may want to fade out image slowly instead of fadeOut(0) if it's visible, and load the new one after fade out is complete.

Categories : Jquery

I am using CIFilter to get a blur image,but why is the output image always larger than input image?
This is a super late answer to your question, but the main problem is you're thinking of a CIImage as an image. It is not, it is a "recipe" for an image. So, when you apply the blur filter to it, Core Image calculates that to show every last pixel of your blur you would need a larger canvas. That estimated size to draw the entire image is called the "extent". In essence, every pixel is getting "fatter", which means that the final extent will be bigger than the original canvas. It is up to you to determine which part of the extent is useful to your drawing routine.

Categories : IOS

How to get image from an Image Control Type in .net c#, I need to save this image in a file and then use it for later comparing
Previewing Image in ASP.NET Image Control using C# help you to get image from an Image Control Type. You can save the image in the below way. Image bitmap = Image.FromFile("C:\MyFile.bmp"); bitmap.Save("C:\MyFile2.bmp"); You should be able to use the Save Method from the Image Class and be just fine as shown above. The Save Method has 5 different options or overloads. //Saves this Image to the specified file or stream. img.Save(filePath); //Saves this image to the specified stream in the specified format. img.Save(Stream, ImageFormat); //Saves this Image to the specified file in the specified format. img.Save(String, ImageFormat); //Saves this image to the specified stream, with the specified encoder and image encoder parameters. img.Save(Stream, ImageCodecInfo, E

Categories : Dotnet

Fill image in skewed container mask - Responsive - CSS3
You still should be able to use background-size: cover; and since your background image gets skewed with the container, set a css rule for it with negative skew values which will revert image to its original form. In your case it would be transform:skew(0deg,30deg);

Categories : CSS

Left align, and center an inline image inside a container
You have problem in this code img { max-width: 100%; height: auto; width: auto9; } just change this with img { max-width: 100%; height: auto; width: auto; } moreover the style you want to apply on it can simply be added without complications that you added. Here is the demo: http://jsfiddle.net/mastermindw/9qAL6/7/

Categories : HTML

Scale images if container is smaller than image nominal width
<div id='container' style="width:700px;height:300px;"> <img src="someimage.jpg"> </div> css: #container img { width:100%; height:auto; /* not needed but for the sake of what is happening */ } What this does is that your image fills the container in width and automatically takes a height that wont break the aspect ratio of your image. No need of js. You could also experiment with the following css property: width: inherit; which inherits the attribute from it's parent.

Categories : Javascript

Mobile Safari: Image with 100% height not visible in absolute positioned container
Try this link to fix any browser issues: (download respond.min.js) https://github.com/scottjehl/Respond Add this to your tag after you download: <script type="text/javascript" src="respond.min.js"></script> Try this link to fix centering issues: http://designshack.net/articles/css/how-to-center-anything-with-css/

Categories : HTML

How to convert image in to binary image using Image processing with Emgu CV
You can transform image into binary by converting it to grayscale and then apllying threshold after that: var bwImage = colorImg.Convert<Gray, byte>().ThresholdBinary(new Gray(yourThrehold), new Gray(255)); if you have small blobs (salt and pepper noise) you can use median filter -function Median or erode the image (function Erode and that dilating it - funcrtion Dilate)

Categories : C#

php image uplaod show default image when image has not been uploaded
you could use file_exists(), like if( !empty($row['article_image']) AND file_exists(YOUR_PATH . $row['article_image']) ) { //show your image from db } else { //show your default image }

Categories : PHP

Image tag - hide the image but show the background image
Why cant you use a div/span instead of using img tag and give background to the div/span? I think that is the best thing to do. <div id="image"></div> #image {background-image: url('close16.png') !important;}

Categories : HTML

get pixel color when image view ' s width is set match_parent when image view contain small image
You need to check the dimensions of your bitmap against the bitmap itself. if ((bmp.getHeight() < (int)event.getY() || (bmp.getWidth() < (int)event.getX() ) { // not within range }

Categories : Java

Dynamic width of image for specific container width only
I think this will help. The code below will change your_images height and width if window size is > 1024, and runs on window resize as well as document ready. $(document).ready(function() { changeSize(); }); $(window).resize(function() { changeSize(); }); function changeSize() { var docw = $(document).width(); var imagebox = $(".imagebox").width(); var image_width = (imagebox / 5); var image_height = (image_width * 0.75); if(docw >= 1024){ $("your_images").width(image_width); $("your_images").height(image_height); } }

Categories : Jquery

How to clip canvas with CSS clip-path?
The clip-path is relative new and could be prone to errors (didn't work for me in Aurora). For a stable result I would suggest just using canvas' clip() method (you don't need composite for this). You can provide the points in this way (here percentages): var path = [50, 33, 75, 10, 80, 80, 60, 75, 40, 60, 20, 10, 40, 20, 50, 33]; Almost as easy as defining in CSS. Then have a function to parse it: function addClip(context, path) { var w = context.canvas.width, h = context.canvas.height; context.beginPath(); context.moveTo(path[0] * w / 100, path[1] * h / 100); for(var i = 2; i < path.length; i+=2) { context.lineTo(path[i] * w / 100, path[i+1] * h / 100); } context.closePath(); context.clip(); } Result: DEMO HERE (The clip is set

Categories : Javascript

Change image on click then back to original image on another image click
When you click on any image, change the image and reset all other images back to their default image. That way, each time any given image is clicks, it will change and you know all others will be set back to default. $('#one').click(function(){ $("#imgone").attr('src',"resources/items/click-image.png"); $("#imgtwo").attr('src',"resources/items/standard-image.png"); $("#imgthree").attr('src',"resources/items/standard-image.png"); }); $('#two').click(function(){ $("#imgone").attr('src',"resources/items/standard-image.png"); $("#imgtwo").attr('src',"resources/items/click-image.png"); $("#imgthree").attr('src',"resources/items/standard-image.png"); }); $('#three').click(function(){ $("#imgone").attr('src',"resources/items/standard-image.png"); $("#imgtwo").a

Categories : Jquery

have container size equal image size
Here is a working jsfiddle. I added some extra CSS to show the borders. You notice you can change the width of the #full_image and the image scales (width does not need to be specified for it to fill the space it's there as an example). You only need max-width to allow it to scale. I noticed you have opacity at 0, I removed that so you could see the image.

Categories : CSS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.