w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to create colored image mouseover on black/white images (in JQuery)
Hey you are talking about CSS filters... this what you need add this code to your main stylesheet file ;) .portfolio:hover { filter: grayscale(100%); -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); filter: grayscale(100%); filter: gray; -webkit-filter: grayscale(1); }

Categories : Javascript

How do I install Image::Magick on mac os x?
AFAIK homebrew version of ImageMagick doesn't contain perl-magick. You should install it from the sources: go to http://www.imagemagick.org/download/perl/ download http://www.imagemagick.org/download/perl/PerlMagick-6.85.0.tar.gz open Terminal.app cd ~/Downloads tar xvzf PerlMagick-6.85.0.tar.gz cd PerlMagick-6.85 perl Makefile.PL make make test make install (or sudo make install) All the above is guessing - I'm using MacPorts. MacPorts has two ports: ImageMagick for the basic ImageMagick and p5-perlmagick for the perl bindings.

Categories : Osx

Resizing an image using Magick.net
When you use the ToBitmap method your image will be converted to Bmp. You probably want to use another image format, e.g. ImageFormat.Png or ImageFormat.Jpeg. Feel free to post a message here also: https://magick.codeplex.com/discussions. And can you also put up a link to the image you are trying to resize?

Categories : C#

How can I upload images in bulk (about 100-200 images at a time) in Ruby on Rails?
Like other things in computer Sc, the answer is it depends™. What I really mean is End-Users going to be uploading these?. If yes use jQuery File Upload plugin to present an easy to use interface. For storage, you can storage it on your server. or even better, upload the images directly from users computers to amazon s3. here is an example of Uploading Files to S3 in Ruby with Paperclip Obviously you will need to convert this into background job where all images get images with ajax in separate jobs. if you already don't have a fav que system, I would suggest resque or sidekiq Note: if you choose to upload images directly to S3 via CORS, then your rails server is free need from managing file uploads. And direct uploads are suggested if you have large images or large number of files

Categories : Ruby On Rails

Converting NArray to Magick::Image in Ruby
Here is some code I used to do this for greyscale only, and seems relatively quick: module Convert PX_SCALE = ( 2 ** Magick::QuantumDepth ).to_f # Converts 2D NArray of floats 0.0->1.0 to Magick::Image greyscale (16-bit depth) def self.narray_to_image na raise( ArgumentError, "Input should be NArray, but it is a #{na.class}") unless na.is_a?(NArray) raise( ArgumentError, "Input should have 2 dimensions, but it has #{na.dim}" ) unless na.dim == 2 width, height = na.shape img = Magick::Image.new( width, height ) { self.depth = 16; self.colorspace = Magick::GRAYColorspace } img.import_pixels(0, 0, width, height, 'I', na.flatten, Magick::DoublePixel ) img end # Converts Magick::Image greyscale to 2D NArray of floats 0.0 -> 1.0 def self.image_to_nar

Categories : Ruby

Image Magick++ equivalent to convert -fill
The documentation for Magick++ is pretty clear, but there's a lot more examples using c & MagickWand. For the most part, -fill is just setting a color attribute that can be applied to a wide variety of actions. In Magick++, you would use Image.fillColor; however, the Image.opaque method swaps one color for another. In addition to the opaque method, color threshold can be adjusted by setting the -fuzz option with Image.colorFuzz. C++ & Magick++ Example #include <Magick++.h> #include <iostream> using namespace std; using namespace Magick; int main(int argc, char **argv) { InitializeMagick(*argv); // Setup items Image image; /* Remember to read & understand Magick++/Color.h to ensure you are initializing the correct color constructo

Categories : C++

Perl Image::Magick Convert Format
When converting to jpg and changing the dimension of the original, use a multiple of 8. So, change your resize to a geometry of '436x216' and see if that helps. See here for more

Categories : Perl

Create an Image either using Magick Wand or ImageMagick on Python 3
You can achieve these using Wand. Creating the images with a background color or a background image Add text with a font Save the image with a “name”

Categories : Python

Modify jQuery UI colorpicker slider to include black and white values
Figured it out: $("#slider-horiz").slider({ orientation: "horizontal", min: 0, max: 360, value: 0, slide: function (event, ui) { box.style.background = 'hsl(' + ui.value + ', 100%, 50%)'; var clr = $('#box').css('background-color'); $('#box').attr('data-color', clr).trigger('click'); if (ui.value == 0) { $('#box').attr('data-color', 'hsl(' + ui.value + ', 0%, 0%)').trigger('click'); $('#slider-handle').css('background-color', '#000'); } if (ui.value == 360) { $('#box').attr('data-color', 'hsl(' + ui.value + ', 100%, 100%)').trigger('click'); $('#slider-handle').css('background-color', '#fff'); } } }); });

Categories : Jquery

Convert colored image to back/white image
BufferedImage bufferedImage= new BufferedImage(img.getWidth(null), img.getHeight(null); ColorConvertOp op = new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY), null); op.filter(bufferedImage, bufferedImage); check this link

Categories : Java

generating css captcha images (letter and white noise)
I found nice tutorial how to make moving noise background here is a tutorial http://blog.jerrettwhite.com/2012/09/moving-noise-background.html

Categories : CSS

Combine two images based on a black and white mask
Just use the bitwise_and() function and you're set. The references below include a full working example. References: How to "zero" everything within a masked part of an image in OpenCV OpenCV bitwise_and + mask

Categories : C++

Bar Button Image is white
UIBarButtonItem has a tintColor property that you can set (since iOS 5). UIKit only use the image you specify as a mask with this tintColor, whose default is white on iOS 5 and 6

Categories : Iphone

Image slider for variable width images with previous and next images partly visible
OK, answering my own question may not be good form – but the page I referenced has been quite heavily modified to do something the original plugin was (as far as I can see) never designed to do.

Categories : Javascript

Using JCROP and JQUERY to crop images using from jsp..url based image source/ dynamic images not working
I think that you were on the right track using jquery's load event but we want to know when the image is loaded not the window. So try: $("#cropbox").load(function(){ $('#cropbox').Jcrop({ onChange: updateCoords, onSelect: updateCoords }); }); so that you only attach jcrop once the image is loaded rather than once the window has loaded.

Categories : Java

Bash script/command to bulk remove "@2x" from filename (retina image -> normal)
Bash offers substitution using the ${var/} syntax. Example: ${i/AAAA/BBBB} replaces AAAA occurrences in $i with BBBB. Therefore loop over all files matching *@2x.* and rename each one. for i in *@2x.*; do mv "$i" "${i/@2x/}" done

Categories : Bash

Remove the white space below image
This is actually a common issue, I noticed myself in my own HTML web development when using CHrome and Developer Tools. Theres seems to be a glitch in the HTML render when you have the developer tools open. It happens every so often, but I know it is a weird bug. I never notice it in any other browser. My suggestion to you, is to just ignore it for now :) (if it doesn't break your HTML of course) Seems like it is just a minor UI space. Good Luck -Kiru

Categories : CSS

image rotation with white background
Try the following: public Bitmap RotateBitmap(Image bitmap, float angle) { Bitmap result = new Bitmap(bitmap.Width, bitmap.Height, bitmap.PixelFormat); using(Graphics graphics = Graphics.FromImage(result)) { graphics.TranslateTransform((float)bitmap.Width / 2f, (float)bitmap.Height / 2f); graphics.RotateTransform(angle); graphics.TranslateTransform(-(float)bitmap.Width / 2f, -(float)bitmap.Height / 2f); graphics.DrawImage(bitmap, Point.Empty); } return result; }

Categories : C#

PlayFramework2: get static image with white space in name
Just ran across this myself; looks like it was fixed in 2.2: https://github.com/playframework/playframework/pull/1522

Categories : Java

Background white color removing of .jpg image using css
CSS is not a tool that is capable of editing an image. It is a style sheet language which is used to describe the presentation of HTML elements in a web page. You can do that with any image editing tool like Photoshop. Still you can crop the image from the sides using CSS but i would not recommend it as the result may not be perfect because of rounded image of phone.(Image you posted) Before you ask a question, make sure that you at least know the basics of it else you will be downvoted to such an extent that you may not be able to ask further questions.

Categories : CSS

Drawing a Line On A White Image in OpenCV
I was able to fix it by declaring i and holder[i] inside the for loop, before the cvLine method. for (i = 0; i < height; i++) { int x1 = i; int y1 = holder[i]/100; int x2 = i + 1; int y2 = holder[i+1]; cvLine(blank, cvPoint (x1, y1), cvPoint (x2, y2), cvScalar(0,255,0), 8, 1); }

Categories : C++

Weird White Image Border W/logo
Here is your soution: img.logo { margin-left:120px; margin-right:auto; margin-top:17px; border:10px ridge #E80000; background-image: url(../Images/Logo.png); background-size:199px 101px; width:199px; height:101px; background-repeat:no-repeat; background-position:center; } Check out the Fiddle: Fiddle Width and Height must be defined in px Edit: Move your img tag in div like <div id="logo"><img/></div> and then add its CSS: #logo{ float:none; margin-left:120px; margin-right:auto; margin-top:17px; border:10px ridge #E80000; background-color: blue; background-image: url(../Images/Logo.png); background-size:199px 101px; width:199px; height:101px; backgro

Categories : HTML

How to Invert a White image to Black using SVG Filters?
acutally IE has a filter for invert, since version 4.0. checkout http://msdn.microsoft.com/en-us/library/ms533008(v=vs.85).aspx

Categories : CSS

How to remove white space between two elements in my div (see image)?
You will have to float the IMG to the left. What I would do is put the text inside of another element and set overflow: hidden; on that element. jsFiddle Demo HTML: <div class="content-wrapper"> <img class="hk-img" src="hksquared.jpg" height= "400px" width="400px"> <div class="text"> <h1 class="text-header-content">Web Development. Software Development. E-commerce. Photograpy.</h1> <p class="text-content">Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Curabitur blandit tempus porttitor. Donec ullamcorper nulla non metus auctor fringilla. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo

Categories : HTML

How to change pixels from image to white and keep transparency?
Create a custom shader! You can use the default deck texture shader as an example. It's in the source somewhere (moai-sim/MOAIShader.. something). Then instead of settings glFragColor to sampler you set it to for example (white) glFragColor = vec4(1, 1, 1, 1) * sampler.a; So that you multiply the color white by the textures alpha value. Look at samples/graphics/ for some shader code. It's not dead simple but it's very flexible once you get it up and running.

Categories : Misc

Background Image comes up as white when displayed using Javascript
I think this problem will be down to the way in which CSS works. If you reference a file within an external CSS file, then the position of the referenced files are relative to the position of the external CSS file. If the CSS is within the HTML itself, then the position of the referenced files are relative to the position of the HTML document So the path that works in the external CSS will not necessarily work directly in the HTML. Update If the value is being set by Javascript (either internal to the page, or held in an external file) then the position will still be based on the HTML page, and NOT the position of the CSS file or JS file

Categories : Javascript

Why is it that the image I use for my nav_bar button has white edges?
Simply remove the rounded rect type from the UIButton declaration and write :- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; instead of UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];

Categories : Iphone

Color overlay on white PNG image with transparency
I found the solution. All I did was - using Photoshop - I added a red color overlay on the image, so now it looks like this: http://i.stack.imgur.com/mVARN.png And then used the following PHP code: <?php $match = array(); $color = isset($_GET['c']) ? $_GET['c'] : false; if ($color === false) isset($_GET['color']) ? $_GET['color'] : false; $color = preg_replace('/^#/','',$color); if (strlen($color) == 3) $color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2]; if (preg_match('/^(?:[A-Fa-f0-9]{2}){3}$/',$color,$match)){ $match = str_split($match[0],2); foreach ($match as $k=>$m){ $match[$k] = intval($match[$k],16); } // Load image $img = imageCreateFromPng('splat.png'); $background = imagecolorallocate($img, 0, 0, 0); imagecolortransparent($img,

Categories : PHP

How to remove white space from masonry image gallery
How about trying this: (beautiful cats :p) <div id="container"> <div class="item"> <img src="http://placekitten.com/190/110" /> </div> <div class="item"> <img src="http://placekitten.com/150/130" /> </div> <div class="item"> <img src="http://placekitten.com/180/120" /> </div> <div class="item"> <img src="http://placekitten.com/160/120" /> </div> <div class="item"> <img src="http://placekitten.com/170/110" /> </div> <div class="item"> <img src="http://placekitten.com/170/130" /> </div> <div class="item"> <img src="http://placekitten.com/180/100" /> </di

Categories : Jquery

Detecting clusters of white pixels in an image using openCV
You could use kmeans clustering using the x y coordinate as the feature for each white point and three clusters. Then take the convex hull of the the resulting three clusters. You may have to try different starting points and select the best result. See http://docs.opencv.org/modules/core/doc/clustering.html#kmeans

Categories : Opencv

Boolean matrix from simple black and white image
You can do it easily using the numpy and matplotlib library: from matplotlib import pylab matrix = pylab.imread('your_image.png') This will produce a numpy matrix which you can show as an image using: pylab.imshow(matrix) Or see just print the raw matrix by with: print(matrix)

Categories : Python

image slider using eq() to get the images trying change it to a var of images
This will be more difficult than just replacing instances of the .eq(), because it's working with DOM elements that we can use .css() and .animate() against, as they're already in the DOM. I think it would be best just to do $.each(get_images, function(i,img){ $('#container').append('<li><img src="'+img+'"/></li>'); }); Then call all the other code after. edit Here's a jsFiddle with my adaptation of your code I simply used bootstrap and a random thumbnail generator, don't pay attention to it in the code. Focus on the get_images variable, and the $.each() function

Categories : Jquery

Fastest way to get number of white pixels in a binary image using OpenCV
The most succinct way to accomplish this is: cv::Mat image, mask; //image is CV_8UC1 cv::inRange(image, 255, 255, mask); int count = cv::countNonZero(mask); If you are operating on a binary image, then the call to cv::inRange() is unnecessary, and simply cv::countNonZero() will suffice. Although any method must iterate through all the pixels, this may be able to harness OpenCV's built-in parallel_for_(), which allows parallel execution. If your image is continuous, you can iterate through all the data using a single loop.

Categories : C#

Making image white space transparent, overlay onto imshow()
The easy way is to simply use your image as a background rather than an overlay. Other than that you will need to use PIL or Python Image Magic bindings to convert the selected colour to transparent. Don't forget you will probably also need to resize either your plot or your image so that they match in size. Update: If you follow the tutorial here with your image and then plot your data over it you should get what you need, note that the tutorial uses PIL so you will need that installed as well.

Categories : Python

Exported shapes as image with vba in powerpoint with a white space in the button and top
One option would be to adjust the size of your shape and/or the size of the text accordingly to the total text length, before exporting it as an image, in order to make sure that your text will never be too close to the border... Something else: have you checked the margins properties of your shape? Putting them to 0 might help a bit.

Categories : Image

Convert white parts in image to transparent to simulate printing
What you basically want is to add an alpha channel to the uploaded image and create a PNG file. The alpha channel should represent the opacity of the printed color. To generate it, you have several options: Take a copy of the image, convert it to grayscale, invert it and use it as alpha channel. Create an alpha channel compute the alpha value of each pixel derived from the original image as: alpha = 1.0 - min(red, green, blue) (use 255 instead of 1.0 depending on whether you're using integer or floating point numbers). Convert the original image to CMYK (using a color profile and not the poor formulas youn find all over the internet) and use it as the basis to create the alpha channel for the original RGB image: alpha = max(cyan, magenta, yellow, black). Come up with an even better form

Categories : PHP

How do i get rid of white space around image and table cells in HTML email
The problem is that slicing full layout sometimes creates unnecessary white space for images, as that full layout slicing does not properly justify the trs and tds for the layout. I suggest you need to create a table in dreamweaver and slice only the images that you require and put them manually. This will solve your issue. I have done it practically and it works for me.

Categories : HTML

white border while displaying a full image with python and opencv
Yes I do. img = np.zeros((900, 1600)) #my aspect ratio is 16x9 cv2.namedWindow("test", cv2.WND_PROP_FULLSCREEN) cv2.setWindowProperty("test", cv2.WND_PROP_FULLSCREEN, cv2.cv.CV_WINDOW_FULLSCREEN) cv2.imshow("test",img) cv2.waitKey(0) gives me a fully black screen. Are you sure you are using the right aspect ratio?

Categories : Python

Android WebView single image, remove white space on the right
First you're loading some html with style information, but no actual content in the webView.loadData call. But then you're completely replacing that html by loading an image url with the webView.loadUrl call. If you want to load an image with styling you need to create the markup with an img tag pointing to your image url. Then you can load that markup with the webView.loadData call. Also, looking at your markup, that CSS wouldn't work as intended even if you had included the image. You've set the max-width of the image to 100%, which means it won't ever be wider than 100%, but that doesn't mean it won't be narrower. If you want the image to always fill the width of the screen, you should set the width property to 100%. In addition, that markup is missing a closing body tag, and the st

Categories : Java

Loaded textures on android, image is just black and white noise
You could try to change: GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, textureBitmap, GLES20.GL_UNSIGNED_BYTE, 0); to: GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, textureBitmap, GLES20.GL_UNSIGNED_BYTE, 0); Bitmap class stores it's pixels as an int - 1 byte for each red, green, blue and alpha. So I think the external format of your textureBitmap is RGBA. And from http://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml: internalformat must match format. No conversion between formats is supported during texture image processing. type may be used as a hint to specify how much precision is desired, but a GL implementation may choose to store the texture array at any internal resolution it chooses. So if you want to use RGB you must either

Categories : Android



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