In this example, we will be adding a watermark (logo) into an image using PHP and GD library. For introduction to PHP GD, visit this post: /blog/2010/03/using-php-gd-to-create-images/ This is the logo image that I will be using: This logo is a PNG file with alpha channel. With transparent images, using PNG is better than using […]

HTML

PHP is a powerful scripting language and there are many powerful plug-ins available. One of them is GD, which can be used to create images on the fly. GD, originally developed by Thomas Boutell by far is the most popular image-processing library for PHP (it is also available for other languages like Perl). GD has […]

This tutorial demonstrates how to use a custom view class (that is a class derived from View or its subclass) in an XML layout. This demonstration assumes basic familiarity with Android SDK and its XML layouting mechanism, the code is written in Android SDK 2.1. Creating The Custom View Class To begin with, let’s create […]

Continuing from: https://permadi.com/blog/2009/05/dashcode-invader-using-dashcode-to-create-a-game/ Base class for the objects in the game. Let’s consider what objects will be in our game. I can think of three-types: Player ship Enemy ship Bullet These objects have in commons these charateristics: They all have positions. They all can move (needs speed variable). Let’s call the base class GameObject from […]

Here are some samples and brief explanation of HTML5 Canvas text related functions. A HTML5 compliant browser (such as Firefox 3.5) is required in order for the examples to work. Basic Text   Use strokeText or fillText, both takes x, y and maximumWidth. The colors are determined by the fillStyle and strokeStyle <script language=”JavaScript”> function […]

I am using WordPress 2.9 for this example: Open Appearance -> Editor. Locate the php file that is being used to display categories.  It’s either Archieves.php or Categories.php.  You can echo something and open up a category page in the browser to see which one is being used. You can also edit the file in […]

This post is a continuation of Part 1, which can be found here: https://permadi.com/blog/2010/03/flash-as3-basic-xml-reading-and-parsing-example-part-1/ To make it easier, here’s again the example XML that we are using: Now let’s start putting these nodes in their intended places. To print the node and node, we can simply refer to it by using E4X notation like this […]

This is some examples for the topic discussed in https://permadi.com/blog/2010/03/cocos2d-color-depth-and-memory-optimizations/ kTexture2DPixelFormat_RGBA4444 Notice the severe banding. kTexture2DPixelFormat_RGBA8888 kTexture2DPixelFormat_RGBA4444 kTexture2DPixelFormat_RGBA8888 kTexture2DPixelFormat_RGBA4444 kTexture2DPixelFormat_RGBA8888

1 5 6 7 8 9 11