imagesy Function in PHP

George John
Updated on 31-Dec-2019 06:24:03

123 Views

The imagesy() function gets the height of image. It returns the height of the image or FALSE on errors.Syntaximagesy(img)Parametersimg: Image resource created with imagecreatetruecolor()ReturnThe imagesy() function returns the height of the image or FALSE on errors.ExampleThe following is an example: Live DemoOutputThe following is the output:250

imagecolorat Function in PHP

Arjun Thakur
Updated on 31-Dec-2019 06:23:18

357 Views

The imagecolorat() function gets the index of the color of the pixel.Syntaximagecolorat( $img, $x, $y )Parametersimg: Create an image with imagecreatetruecolor() function.x: The x-coordinate of the point.y: The y-coordinate of the point.ReturnThe imagecolorat() function returns the color index or FALSE on failure.ExampleThe following is an example: Live DemoOutputThe following is the output:array(4) { ["red"]=> int(255) ["green"]=> int(255) ["blue"]=> int(255) ["alpha"]=> int(127) }

Get Image Size Using getimagesize Function in PHP

Chandu yadav
Updated on 31-Dec-2019 06:22:42

3K+ Views

The getimagesize() function is used to display the size of an image.Syntaxgetimagesize(file_name, img_info)Parametersfile_name: The file image i.e. the image path.img_info: Extract some extended information from the image file. Supports only JFIF files.ReturnThe getimagesize() function returns an array element with height, width, type, MIME type of the image, etc.ExampleThe following is an example: Live DemoOutputThe following is the output:Array ( [0] => 205 [1] => 120 [2] => 3 [3] => width="205" height="120" [bits] => 8 [mime] => image/png)

jQuery clearQueue with Examples

AmitDiwan
Updated on 31-Dec-2019 06:21:53

170 Views

The clearQueue() method in jQuery is used to remove all items from the queue.SyntaxThe syntax is as follows −$(selector).clearQueue(queue)Above, the queue is the name of the queue.ExampleLet us now see an example to implement the jQuery clearQueue() method − Live Demo    $(document).ready(function(){       $(".button1").click(function(){          var div = $("div");          div.animate({height: 250}, "slow");          div.animate({left: "+=200", top: "+=100" }, "slow");          $("span").text(div.queue().length);       });       $(".button2").click(function(){          $("div").clearQueue();       });    }); ... Read More

ImageFill Function in PHP

Ankith Reddy
Updated on 31-Dec-2019 06:21:35

421 Views

The imagefill() function is used to fill the image.Syntaximagefill(img, x, y, color)ParametersimgCreate a blank image with imagecreatetruecolor().x x-coordinate of start pointy y-coordinate of start pointcolor The fill color.ReturnThe imagefill() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imageDashedLine Function in PHP

George John
Updated on 31-Dec-2019 06:20:51

104 Views

The imagedashedline() function draws a dashed line.Syntaximagedashedline( $image , $x1 , $y1 , $x2 , $y2 , $color )Parametersimage Create a blank image with imagecreatetruecolor().x1 Upper left x-coordinatey1 Upper left y-coordinatex2 Bottom right x-coordinatey2 Bottom right y-coordinatecolor The fill color.ReturnThe function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imagefilledrectangle Function in PHP

Arjun Thakur
Updated on 31-Dec-2019 06:20:11

1K+ Views

The imagefilledrectangle() function draws a filled rectangle.Syntaximagefilledrectangle( $img, $x1, $y1, $x2, $y2, $color )Parametersimage Create a blank image with imagecreatetruecolor().x1x-coordinate for point 1.y1 y-coordinate for point 1.x2 x-coordinate for point 2.y2 y-coordinate for point 2.color The fill color.ReturnThe imagefilledrectangle() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imagefilledellipse Function in PHP

Chandu yadav
Updated on 31-Dec-2019 06:19:07

177 Views

The imagefilledellipse() function is used to draw a filled ellipse.Syntaximagefilledellipse( $img, $cx, $cy, $width, $height, $color )Parametersimg This creates a blank image with imagecreatetruecolor()cx x-coordinate of the center.cy y-coordinate of the center.width The ellipse width.height The ellipse height.color The fill color.ReturnThe imagefilledellipse() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

Setting Up Background Color Using CSS

AmitDiwan
Updated on 30-Dec-2019 12:49:36

244 Views

To set background color using CSS, use the background-color property.ExampleLet us now see an example − Live Demo .demo {    text-decoration: overline underline;    background-color: red; } Details Examination Center near ABC College. Exam begins at 9AM. OutputExampleLet us now see another example − Live Demo .demo {    text-decoration: overline underline; } Details Examination Center near ABC College. Exam begins at 9AM. Output

Relative Positioning in CSS

AmitDiwan
Updated on 30-Dec-2019 12:44:26

273 Views

With relative positioning, the element is positioned relative to its normal position. For this, use position: relativeExampleLet us now see an example − Live Demo div.demo {    position: relative;    color: white;    background-color: orange;    border: 2px dashed blue;    left: 50px; } Demo Heading This is demo text. This is demo text. position: relative; This is another demo text. Output

Advertisements