Pixint Graphics

Pixint

Wednesday, November 23, 2011

Run a program automatically when Windows starts

  • Click the Start button Picture of the Start button, click All Programs, right-click the Startup folder, and then click Open. 
  • Open the location that contains the item to which you want to create a shortcut. 
  • Right-click the item, and then click Create Shortcut. The new shortcut appears in the same location as the original item. 
  • Drag the shortcut into the Startup folder. 

The next time you start Windows, the program will run automatically.

Tuesday, March 30, 2010

Fckeditor - Image resize on Upload

Fckeditor (Html text editor) v-2.6.4 does not have automatic image resizing feature on upload or at least i don't know :( whether this editor has this feature. So to be able to resize picture on upload via fckeditor i bring some changes on "commands.php" file of fckeditor files. This file located on '\editor\filemanager\connectors\php' of the fckeditor folder. Open this file and

1. go to line # 219. It looks like

move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; 

This line is under the function 'FileUpload'

2. Now change the line to

       if($sExtension == 'jpg' || $sExtension == 'jpeg' || $sExtension == 'gif' ) 
        { 
         $uploadedfile = $_FILES['NewFile']['tmp_name']; 
                     
          // Create an Image from it so we can do the resize 
           $src = imagecreatefromjpeg($uploadedfile); 
                           
            // Capture the original size of the uploaded image 
            list($width,$height)=getimagesize($uploadedfile); 
                         
            // For my purposes, I have resized the image to be 
            // 450 pixels wide, and maintain the original aspect 
            // ratio. This prevents the image from being "stretched" 
            // or "squashed". If you prefer some max width other than 
            // 450, simply change the $newwidth variable 
            $newwidth=450;
            if ($width < $newwidth) $newwidth = $width;
            $newheight=($height/$width)*$newwidth; 
            $tmp=imagecreatetruecolor($newwidth,$newheight); 
                          
            // this line actually does the image resizing, copying from the original 
            // image into the $tmp image 
             imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); 
                          
             // now write the resized image to disk. I have assumed that you want the 
             // resized, uploaded image file to reside in the ./images subdirectory. 
             $filename = $_FILES['NewFile']['tmp_name']; 
             imagejpeg($tmp,$filename,100); 
             move_uploaded_file( $filename, $sFilePath ) ; 
             imagedestroy($src); 
             imagedestroy($tmp); 
         } 
         else 
         { 
              move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ; 
         }   


3. thats all.

It works for me and hope will for you.

How to Hide/Un-Hide Recycle Bin Icon on Desktop in XP

This is the simple way.
From Group Policy Editor we will Hide the Recycle Bin Icon.
  • Click Start, Click Run, Type GPEDIT.MSC, Press Enter
  • On the Left Column Expand Administrative Templates, click on Desktop
  • On the Right Column Find Remove Recycle Bin Icon from Desktop
  • Double click on it, A Property Window will Appear
  • Select Enable option, Press OK.
  • Refresh Desktop, Enjoy!
To Show Recycle Bin Icon on Desktop, Do same steps but instead of Enable select      Not Configured.

2)     This step is somewhat risky, if you done this incorrectly you may have to Reinstall
         your Operating System. This Blog's Author will not be liable if any damage occurs.
         Do it on your own risk or choose the first way.
NOTE : - Backup your Registry File before Proceeding.

Tuesday, June 2, 2009

Life!

Life is long travel
on the way
we meet many persons
but some one lives in your heart forever
without our permission.
Like you...

Two Gifts!

life gives two gifts to human.
1. Chance.
2. Choice.
Chance to have many friends and choice to select good friends.