Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Server Side Programming Articles
Page 1054 of 2109
imagesy() function in PHP
The imagesy() function gets the height of an image resource in PHP. It returns the height of the image in pixels or FALSE on errors. Syntax imagesy(image) Parameters image − An image resource created by one of the image creation functions like imagecreatetruecolor(), imagecreatefromjpeg(), etc. Return Value The imagesy() function returns the height of the image in pixels as an integer, or FALSE on failure. Example The following example demonstrates how to get the height of a newly created image − ...
Read Moreimagecolorat() function in PHP
The imagecolorat() function gets the color index of a pixel at specific coordinates in an image resource. It's useful for analyzing pixel colors in image processing tasks. Syntax imagecolorat($image, $x, $y) Parameters $image − An image resource created by functions like imagecreate() or imagecreatefromjpeg() $x − The x-coordinate of the pixel (horizontal position) $y − The y-coordinate of the pixel (vertical position) Return Value Returns the color index as an integer, or FALSE on failure. For truecolor images, this returns the RGB value as a packed integer. Example 1: ...
Read Moregetimagesize() function in PHP
The getimagesize() function in PHP is used to retrieve the dimensions and other information about an image file. It can work with both local files and remote URLs, returning an array containing width, height, image type, and additional metadata. Syntax getimagesize(file_name, img_info) Parameters file_name − The path to the image file (local or remote URL) img_info (optional) − An array to store extended information from the image file. Currently supports only JFIF files Return Value The function returns an indexed array with the following elements ? [0] − ...
Read Moreimagefill() function in PHP
The imagefill() function is used to perform a flood fill operation on an image, filling an area with a specified color starting from a given point. Syntax imagefill(img, x, y, color) Parameters img − An image resource created by functions like imagecreatetruecolor() or imagecreatefromjpeg() x − x-coordinate of the starting point for the fill operation ...
Read Moreimagedashedline() function in PHP
The imagedashedline() function in PHP draws a dashed line on an image resource. This function is part of the GD library and creates a line with alternating filled and empty segments between two specified points. Syntax imagedashedline($image, $x1, $y1, $x2, $y2, $color) Parameters image − An image resource created by functions like imagecreatetruecolor() x1 − Starting point x-coordinate y1 − Starting point y-coordinate x2 − Ending point x-coordinate y2 − Ending point y-coordinate color − Line color created with imagecolorallocate() Return Value Returns TRUE on success or FALSE on failure. ...
Read Moreimagefilledrectangle() function in PHP
The imagefilledrectangle() function in PHP draws a filled rectangle on an image resource. This function is part of the GD extension and is commonly used for creating graphics, overlays, and visual elements programmatically. Syntax imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color) Parameters $image − An image resource created by functions like imagecreatetruecolor(). $x1 − x-coordinate of the first corner (top-left). $y1 − y-coordinate of the first corner (top-left). $x2 − x-coordinate of the opposite corner (bottom-right). $y2 − y-coordinate of the opposite corner (bottom-right). $color − The fill color created with imagecolorallocate(). ...
Read MoreIntlChar isgraph() function in PHP
The IntlChar::isgraph() function checks whether a given character is a graphic character or not. Graphic characters are visible characters that have a visual representation, excluding whitespace and control characters. Syntax bool IntlChar::isgraph(mixed $codepoint) Parameters codepoint − An integer codepoint value (e.g., 0x41 for 'A'), or a character encoded as a UTF-8 string (e.g., "A"). Return Value The IntlChar::isgraph() function returns TRUE if the codepoint is a graphic character, FALSE otherwise. Returns NULL on failure. Example The following example demonstrates checking various characters ? ...
Read MoreIntlChar isMirrored() function in PHP
The IntlChar::isMirrored() function is used to check whether a character has the Bidi_Mirrored property, which indicates if the character is mirrored in bidirectional text (like Arabic or Hebrew). Syntax bool IntlChar::isMirrored(mixed $codepoint) Parameters codepoint − An integer codepoint value or a character encoded as a UTF-8 string. Return Value Returns TRUE if the character has the Bidi_Mirrored property, FALSE otherwise. Example The following example demonstrates checking various characters for the Bidi_Mirrored property − Output bool(true) bool(true) bool(false) bool(false) bool(true) bool(true) ...
Read MoreIntlChar::isblank() function in PHP
The IntlChar::isblank() function checks whether the entered value is a blank or horizontal space character. This function is part of PHP's Internationalization extension and follows Unicode standards for character classification. Syntax IntlChar::isblank(val) Parameters val − An integer or character encoded as a UTF-8 string representing a Unicode code point. Return Value The IntlChar::isblank() function returns TRUE if the entered value is a blank or horizontal space character, FALSE otherwise. Returns NULL on failure. Example The following example demonstrates how to use IntlChar::isblank() with different characters ? ...
Read MoreIntlChar::islower() function in PHP
The IntlChar::islower() function checks whether the given input character is a lowercase character or not. Syntax bool IntlChar::islower(val) Parameters val − A character encoded as a UTF-8 string or an integer codepoint value. Return Value The IntlChar::islower() function returns TRUE if the entered value is a lowercase character, FALSE otherwise. Example The following example demonstrates how to check if characters are lowercase − The output of the above code is − bool(true) bool(false) bool(true) bool(false) bool(false) Using Unicode Codepoints ...
Read More