rss
twitter
  •  

Amarok 1.4 on Ubuntu 10.04 (Lucid Lynx)

| Posted in Tech-News, ubuntu |

2

This is an update from my previous post about installing Amarok 1.4 on Ubuntu 9.04 (Jaunty Jackalope).

Follow this step:

sudo add-apt-repository ppa:bogdanb/amarok14
sudo apt-get update
sudo apt-get install amarok14

If you have some error messages like:
amarok14: Depends: libmysqlclient15off (>= 5.0.27-1) but it is not installable

download this file, and install
http://security.debian.org/debian-security/pool/updates/main/m/mysql-dfsg-5.0/libmysqlclient15off_5.0.32-7etch12_i386.deb

This will fix the dependencies problem.

VN:F [1.9.3_1094]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Age of Empire II color issue on Windows 7

| Posted in Tech-News |

3

There’s a color issue with Age of Empires 2 on Windows 7. You will get a corrupted color in game. Its not a driver issue or some directx compatibility. I think its just because of the Aero theme’s poor handling of colors.

So how to fix it? simply..

  1. Change to Windows Classic Theme
  2. Open the resolution changer window (Right click on your desktop, and select “Change Resolution”)
  3. Run Age of Empire game.

Now the color problem has gone.

Sounds silly?? nope.. IT WORKS!
Believe me, it really works..

VN:F [1.9.3_1094]
Rating: 8.7/10 (3 votes cast)
VN:F [1.9.3_1094]
Rating: +1 (from 1 vote)

Google has raise the invitation for Google Wave

| Posted in Tech-News |

3

Today i have new wave from Google. Yeah, they raise the invitation to use. Now i have a plenty invitation to invite others.

gwave-invitation

Now i really like to share here.
Anyone?

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)

PHP-GD: Create Image from Text

| Posted in Programming |

0

Some people want to hide their text into image for any reason. As example, to avoid spambot steal their email address, or to generate dynamic images content.

Its simply done with PHP and GD Library. See this simple function:

function imgfromstring($string){
	$font  = 5;
	//dynamic size of image. to fit your text.
	$width  = ImageFontWidth($font) * strlen($string);
	$height = ImageFontHeight($font);

	//start creating the image
	$gbr = imagecreate ($width,$height);

	//set background to white
	$bgcolor = imagecolorallocate($gbr, 255, 255, 255);
	//set color for text
	$txtcolor = imagecolorallocate ($gbr, 0, 0, 0);

	//generate the image
	imagestring($gbr, $font, 0, 0, $string, $txtcolor);
	header("Content-type: image/jpeg");
	return imagejpeg($gbr);
}

//usage:
$txt = "u...@email.com";
echo imgfromstring($txt);

example output: u...@sample.com" border="0" alt="" />

Another sample is using image as the background. Its useful when you need to create waterwark to protect your images.
Sample code:

function toImgWithBG($str){
	$bg = "background.jpg";
	$font = 5; //Font size

	$gbr =imagecreatefromjpeg($bg);

	//Calculate string width and height
	$pos_x  = imagesx($gbr) - (ImageFontWidth($font) * strlen($str));
	$pos_y = imagesy($gbr) - ImageFontHeight($font);

	//set text color
	$teks = imagecolorallocate($gbr, 255, 0, 0);

	//generate the image, and put on the right bottom
	imagestring($gbr, 5, $pos_x, $pos_y, $str, $teks);

	header("Content-type: image/jpeg");
	return imagejpeg($gbr);
}

//Usage:
echo toImgWithBG("copyright: http://www.akemapa.com/");

example output:

You can download source code of this example here:
download here download this file

VN:F [1.9.3_1094]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.3_1094]
Rating: +2 (from 2 votes)

Google Wave Invitation

| Posted in Tech-News |

4

Google Wave
On 30 September 2009, Google released their new product named “Google Wave“. Unfortunately, its still a “Preview Release”. which means, you must have the invitation from Google Team or other user who already has the Google Wave account.

Otherwise, you can request invitation from Google by this page:
https://services.google.com/fb/forms/wavesignup/

for Developers, you can request here:
https://services.google.com/fb/forms/wavesignupfordev/

google-wave

I requested for Google Wave invitation since early october. Luckily, a few days ago Google has sent me the invitation. And they gave me some invitations to share too.

I think i’m gonna share some invitations here. If you donate me of course.. LOL…

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)