Wednesday, December 28, 2005
Happy Holidays
Friday, December 16, 2005
Thank God its Friday
Tuesday, November 29, 2005
Metro in Paris
Friday, November 25, 2005
create typewriter effect with ming php for flash (swf) movie
setBackground(0x00,0x00,0x00);// SM - This is very important as it set sets the speed of the movie// SM - Higher the number faster the typing will appear$movie->setRate(3);// SM - This one will depends upon you$movie->setDimension(600,40);$movie->setFrames(31);$movie->nextFrame();// Define your String here $str = 'Miing Typewriter Effect'; /* SM - As you note The space between character if not fixed SM - due to font width so you have to figure out your own SM - Now we split our string and make an array with the same */ $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);// print_r($chars);$inc = 0 ;for($i=0;$isetFont($myFont); $myText->setColor(255,255,255); $myText->SetHeight(30); $myText->addString($chars[$i]); echo ("$chars[$i] \n") ; $firstText=$movie->add($myText); $firstText->moveTo($inc,30); $inc = $inc + 18; // SM - this is very critical as you need to add this extra frame to make this effect of some typewriter $movie->nextframe(); // SM - This helps to determine the width of the movie // SM - turn only if you need the same // echo "inc is $inc \n" ; } // SM - we do not want to loop this movie// $movie->add(new SWFAction("stop();")); // SM - Save the movie $movie->save("/tmp/banner.swf",9);?>
Friday, November 18, 2005
Create Banner with mirror effect by ImageMagick
convert -size 460x130 xc:white -font forte -pointsize 72 -fill "#cccccc" -annotate 0x180+12+80 "Banner Mirror" -gaussian 0x2 -stroke black -strokewidth 1 -fill "#80904F" -stroke black -strokewidth 1 -annotate 0x0+12+55 "Banner Mirror" -draw "line 0,68 430,68" Banner-Mirror-Imagemagick.jpg
Wednesday, November 16, 2005
Reached 10K and folding
Monday, November 14, 2005
Orsay revisited
Thursday, November 10, 2005
Diwali at Paris
"Are you safe out there?" This was typical question to which I have been answering to my friends and relatives after the riots at Paris suburbs. I myself was keeping updated with news only. "Thank God" it looks like getting better now. I would not like to make any comments and express my view on the same as it seems to be very complex matter.
We celebrated Diwali quite well this year. On evening of 2nd oct. it was at Vendanta Society of Paris(with puja).And on 5th it was at Maison de l'inde with fireworks and cultural activities. But this year the biggest celebration of Diwali was hosted by Mayor of Paris at “Hotel de Ville” for the first time. It was an event by invitation. Unfortunatley, I didnot have enough social contacts to be there.
Friday, November 04, 2005
Part -2
[code]
<?php
//$image_files=[] ;
$type = "jpg";
$abspath_folder = "/home/santm/public_html/PamelasCreation/images" ;
if ( is_dir ( $abspath_folder ) ) {
if ( $handle = opendir( $abspath_folder ) ) {
while (false !== ( $file = readdir($handle ) ) ) {
if ( $file != '.' && $file != '..' && $file != 'CVS' && $file != 'index.html' ) {
//santm echo "FILE is $file \n" ;
$the_array[] = $file;
}
}
}
}
closedir( $handle );
// end of reading the directory
// santm print_r ( $the_array );
// making sure the array only has our jpg image starting with a number
foreach ( $the_array as $img ) {
if ( !is_dir( $abspath_folder .'/'. $img ) ) {
if ( eregi( $type, $img ) && eregi ( "^[0-9]", $img)) {
$the_image[] = $img;
}
}
}
// the main part
if ( !$the_image ) {
echo "no image \n";
}
else {
$i = count ( $the_image);
echo "count $i\n";
// sort the array
rsort ($the_image) ;
//print_r ($the_image ) ;
for ($k = 0 ; $k < $i ; $k++) {
$bb = $k+1 ;
echo "santm $the_image[$k] \n" ;
$full_name = explode (".",$the_image[$k]);
$short_name = $full_name[0];
$foo_img = images .'/'. $short_name;
if ( $k != 0 ) {
$pre_name = explode (".",$the_image[$k - 1]);
$pre_short_name = $pre_name[0];
}
if ($bb != $i ){
$next_name = explode (".",$the_image[$k + 1]);
$next_short_name = $next_name[0];
}
echo " short $short_name \n";
//
// doing dirty way with system call for placing the header
//
$head_out = shell_exec ('cat /home/santm/head.pam.inc');
$write_handle = fopen ("/home/santm/public_html/PamelasCreation/$short_name.html","w+");
fwrite ($write_handle,$head_out);
fwrite ($write_handle,"
fwrite ($write_handle,"
\"big_photo\">\n");
fwrite ($write_handle,"
if ( $pre_short_name ) {
fwrite ($write_handle,"
img src=\"images/previous.gif\" alt=\"next\" border=\"0\">
}
if ((!$pre_short_name) || (!$next_short_name)) {
fwrite ($write_handle,"
/%\">
}
else {
fwrite ($write_handle,"
\"images/home.gif\" alt=\"home\" border=\"0\">
}
if ( $next_short_name ) {
fwrite ($write_handle,"
}
fwrite ($write_handle,"\n");
fwrite ($write_handle,"\n");
fclose ($write_handle) ;
}
}
?>
[/code]
photo album : imagemagick (part -1)
Quick and dirty way of creating photo album with imagemagick, creating images with black border as it looks good for all
#!/bin/cshset files = `echo [0-9]*.jpg`echo $filesforeach file ( $files )set w = `identify -format "%w" $file`set h = `identify -format "%h" $file`if ($w > $h) then convert $file -thumbnail 500X -bordercolor black -border 1 /tmp/foo100/$fileelse convert $file -thumbnail X500 -bordercolor black -border 1 /tmp/foo100/$fileendifend



