OxyScripts.com
Menu spacer Home Tutorials Articles Code Forums irc.freenode.net #oxyscripts
Main (PHP)
Home Forums PHP News PHP Tutorials Articles PHP Code Snippets Contact Us Sysadmin Resources Books Template Shop
3rd Party Streams
SlashDot PHPDeveloper.org PHP.Net
Resources
PHP Manual MySQL Manual Smarty Manual PEAR Manual PHP-GTK Manual Symfony Manual
Code Snippets
Authentication Database Graphics HTTP Miscellaneous Time/Date
Affiliates
Scripts TutorialMan TutorialGuide CodingForums.com PHP Scripts Cheap Web Hosting Affordable Web Hosting Dreamweaver Templates

Search This Site :     PHP Function Reference :
 
Image related php-gtk functions

Images are displayed using the GtkPixmap widget which has to be invoked with two parameters; a map of type GdkPixmap and a mask of type GdkBitmap. The map defines all the pixels with its colors, and as the map is not able to contain transparent color information, the mask is a map of 1's and 0's telling which pixel is transparent and which not.

There are two functions dedicated to reading of XPM images:

As both functions are identical in usage, I will describe pixmap_create_from_xpm_d only.
list( $pixmap, $mask) = gdk::pixmap_create_from_xpm_d( $objWindow->window, $colTransparent, $arImage);
The function returns an array of size 2: the first is the map with all the pixels and colors, and the second is the mask with transparency information. We store them in two different variables here, although you can just use an array.

The first parameter, $objWindow->window is the GdkWindow of your application's window. Please make sure that the GdkWindow exists by showing the GtkWindow or by calling the realize() function.

The second parameter, $colTransparent defines which color the transparent color (color None) will get if the pixmask is not used when creating e.g. the GtkPixmap.

The third parameter is the name of the image file (pixmap_create_from_xpm), or a normal php array with the structure as described in the XPM standard (pixmap_create_from_xpm_d).

 
   Print this page

Top Sponsor
Symantec\'s Norton SystemWorks 2006
Sponsors
CA
Sponsors
AdWords Dominator 125*125
Advertisting


Affiliates
VertexTemplates PHPFreaks CodeWalkers StarGeek DevScripts CGI & PHP Scripts PHP CMS Free Templates

Shopping Rebates   Sell It 4 You   Flash Page Counters   Get Insured
GPS Tracking Service   Charity Donate Info   Web Site Hosting   VOIP Service

Privacy Policy | Links | Site Map | Advertising

All content on OxyScripts.com is (©)2002-2007

 
Powered by Adrastea - Version 1.0.0. Copyright © Rune Solutions, 2004-2005