Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagexbm(3) [php man page]

IMAGEXBM(3)								 1							       IMAGEXBM(3)

imagexbm - Output an XBM image to browser or file

SYNOPSIS
bool imagexbm (resource $image, string $filename, [int $foreground]) DESCRIPTION
Outputs or save an XBM version of the given $image. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $filename -The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. o $foreground - You can set the foreground color with this parameter by setting an identifier obtained from imagecolorallocate(3). The default foreground color is black. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Saving an XBM file <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Save the image imagexbm($im, 'simpletext.xbm'); // Free up memory imagedestroy($im); ?> Example #2 Saving an XBM file with a different foreground color <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Set a replacement foreground color $foreground_color = imagecolorallocate($im, 255, 0, 0); // Save the image imagexbm($im, NULL, $foreground_color); // Free up memory imagedestroy($im); ?> NOTES
PHP Documentation Group IMAGEXBM(3)

Check Out this Related Man Page

IMAGEGD(3)								 1								IMAGEGD(3)

imagegd - Output GD image to browser or file

SYNOPSIS
bool imagegd (resource $image, [string $filename]) DESCRIPTION
Outputs a GD image to the given $filename. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $filename -The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Outputting a GD image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); // Output the image imagegd($im); // Free up memory imagedestroy($im); ?> Example #2 Saving a GD image <?php // Create a blank image and add some text $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); // Save the gd image // The file format for GD images is .gd, see http://www.libgd.org/GdFileFormats imagegd($im, 'simple.gd'); // Free up memory imagedestroy($im); ?> NOTES
Note The GD format is commonly used to allow fast loading of parts of images. Note that the GD format is only usable in GD-compatible applications. SEE ALSO
imagegd2(3). PHP Documentation Group IMAGEGD(3)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

coverting to xbm

Heleuw, I want to convert an image to .xbm the problem is that, wehen I convert it it is only a 2 color image,(black&white), someknowes a tool or an other solution to get the complete image to .xbm with colors and sizes etc:confused: Thnx in advance EJ =) (2 Replies)
Discussion started by: EJ =)
2 Replies

2. Shell Programming and Scripting

AWK Help

HI All, Need a help Suppose I have a file having the data 1,FF,233 where the second field is Hex now I want to convert this hex in dec and see the output as 1,255,233 Request you all to help Regards, Gaurav Goel (6 Replies)
Discussion started by: gauravgoel
6 Replies

3. UNIX for Dummies Questions & Answers

Saving stuff to a text file

If I do a "history" and get a list of commands that I've done before, can I save them to a text file? If not, then would there be any other ways around this? Also, what's a snapshot? Thanks in advance. (6 Replies)
Discussion started by: DrManhattan
6 Replies

4. Shell Programming and Scripting

Extract fields

Hi, I have a tmp file like below: <ADATA> ANUM=900 ADESC=Saving ATYP=0 TXREGD=0 </ADATA> <ADATA> ANUM=890 ADESC=Saving ATYP=0 ABAL=9000 TXREGD=1 </ADATA> <ADATA> (2 Replies)
Discussion started by: kunigirib
2 Replies

5. UNIX for Advanced & Expert Users

How to save as image from a web page

I used flot to create a graph and I would like to be able to save/export the graph as an image. In firefox on windows you can just ctl rt-click and you have a save as image feature (which I can automate with js) but...I need this to work on a linux browser. On linux in firefox I can print preview... (11 Replies)
Discussion started by: vincaStar
11 Replies

6. Shell Programming and Scripting

String Character Manipulation

I have an image 46272-th.jpg I would like to have the ability to add / onto the first 3 characters to allow me to mange my image names and move them to the appropriate folders. So for example, the desired output would be..... mv 46272-th.jpg 4/6/2/46272-th.jpg Can anyone please help me? (2 Replies)
Discussion started by: bjfre1
2 Replies