Code solutions to PHP, JS, CSS

Spread your code soluces to the world

Love me

Search results for : image    (10)

Javascript Image magnification (javascript)

Add magnifying glass options on your images with this simple code.
solucior.com/29-Javascript_Image_magnification.html

Isolate a color (php gd image)

Here is a class to isolate a primary color rendering of a photo black and white. The choice of using Object-oriented programming instead of a function gives the advantage to add filters or other image effects thereafter. Instantiation [code]$obj = new image_effect(); // Optional : ratio size of the working image. default : 2 ...
solucior.com/23-Isolate_a_color.html

Extract images from a page (php)

Getting all IMG sources and ALT from a local or remote page that returns an array. This function uses the DOM API from PHP 5. get_i( file ) = array( att, value )
solucior.com/26-Extract_images_from_a_page.html

Horizontal scroll div with javascript (javascript)

Very simple method to horizontally scroll a DIV content without displaying scrollbars with Javascript. • The container div has overflow:hidden and a fixed height and width. • Its ID has to be recalled in the scrolldiv() function calls. This allows the multiple use of this function on the same page.
solucior.com/34-Horizontal_scroll_div_with_javascript.html

Dynamic image resizing according to location (javascript)

This javascript method resize image according to its location in the page. Images do not overflow the page or div that contains them. It works automatically, it is not necessary to modify the HTML content of the body. Implementation : • copy the javascript code in the header, between <head> and </head> • In the body...
solucior.com/19-Dynamic_image_resizing_according_to_location.html

Javascript opacity (javascript)

Here is the method the most compatible to change the CSS opacity of an element with javascript. [code]opacity // modern browser -moz-opacity // older versions based on firefox -khtml-opacity // older versions based on Konkeror and Safari filter: alpha(opacity) // Internet Explorer before 8.0 ...
solucior.com/18-Javascript_opacity.html

Adjust the rate of image colors (php gd image)

This script adjusts the amount of colors in a jpg, gif or png picture. By modifying the value $variant between -25 and 15, you get a picture more or less colorful. Original picture
solucior.com/14-Adjust_the_rate_of_image_colors.html

Zoom with CSS3 (css)

CSS3 allows the function of "scaling"(or zoom) on an HTML element. In the example below, the scale is assigned to the pseudo class : hover. Syntax : transition: (transition-property) (transition-duration in secondes) (transition-timing-function) • transition-property : all, css property • transition-duration : timing...
solucior.com/15-Zoom_with_CSS3.html

Simple image gallery PHP (php)

The following code is an image gallery script in PHP as easy as possible. A single file of a few lines of code is sufficient to list the images, create thumbnails and display them. Copy the entire code into a PHP file. Name it as you wish and drop it in a directory containing images. For reasons of simplicity, this code has no error handling....
solucior.com/17-Simple_image_gallery_PHP.html

Automatically adjust brightness contrast of an image (php gd image)

This script adjusts the brightness and contrast of an image using PHP5 and the GD2 library. Set the variable $url_img with the path of your initial image. You can change the variable  which corresponds to the size of the working image of the script.
solucior.com/5-Automatically_adjust_brightness_contrast_of_an_image.html