- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chandu yadav has Published 1163 Articles
Chandu yadav
71 Views
The elements and are useful for screenreaders as well and help visually impaired users in reading the content of your web page. These are beneficial for eBook readers as well.Let us see how to work with both the elements. HTML Section Tag ... Read More
Chandu yadav
385 Views
For double buffering on the canvas, create a 2nd canvas element and draw to it. After that draw the image to the first canvas using the drawImage() method, // canvas element var canvas1 = document.getElementById('canvas'); var context1 = canvas1.getContext('2d'); // buffer canvas var canvas2 = document.createElement('canvas'); canvas2.width = 250; ... Read More
Chandu yadav
84 Views
The imageconvolution() functionSyntaxbool imageconvolution (img, matrix, div, offset )Parametersimg: Create image with imagecreatetruecolor() function.matrix: A 3x3 matrix is an array of three arrays of three floats.div: Divisor of the result of the convolution, used for normalization.offset: The color offset.ReturnThe imageconvolution() function returns True on success or False on failure.ExampleThe following ... Read More
Chandu yadav
37 Views
The imagecolorstotal() function gets the count of colors in an image's paletteSyntaximagecolorstotal (img)Parametersimg: Image created with imagecreatetruecolor().ReturnThe imagecolorstotal() function returns the number of colors in an image palette.ExampleThe following is an example Live DemoOutputThe following is the output:Number of Colors = 128
Chandu yadav
608 Views
The imagecopymerge() function copy and merge part of an image.Syntaximagecopymerge ( dst_img, src_img, dst_x, dst_y, src_x, src_y, src_w, src_h, pct )Parametersdst_im Set destination image link resource.src_im Set source image link resource.dst_x Set x-coordinate of destination point.dst_y Set y-coordinate of destination point.src_x Set x-coordinate of source point.src_y Set y-coordinate of source ... Read More
Chandu yadav
74 Views
The imagechar() function draws a character horizontally.Syntaxbool imagechar( img, font, x, y, ch, color )Parametersimg: Creating an image with imagecreatetruecolor().font: Set font sizex: x-coordinatey: y-coordinatec: The character to draw.color: A color identifier created with imagecolorallocate().ReturnThe imagechar() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following ... Read More
Chandu yadav
462 Views
The imagecolorallocate() function allocates a color for an image.Syntaxint imagecolorallocate ( $img, $red, $green, $blue )Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentReturnThe imagecolorallocate() function returns a color in RGB format.ExampleThe following is an example:OutputThe following is the output:
Chandu yadav
6K+ Views
The imagecreate() function is used to create a new image. It is preferred to use imagecreatetruecolor() to create an image instead of imagecreate(). This is because the image processing occurs on the highest quality image possible which can be created using imagecreatetruecolor().Syntaximagecreate( $width, $height )Parameterswidth: The width of imageheight: The ... Read More
Chandu yadav
2K+ 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 ... Read More