Aurigma Forums
 » 
Graphics Mill
 » 
Discussions – Graphics Mill
 » 
Apply blur only to a rectangular part of a bitmap
 
		
        
            
            
	
    
        
Rank: Newbie
  Groups: Guest
 Joined: 9/3/2008(UTC) Posts: 2
  
 
     | 
	
    
        
            
	      
                Hi all
  Everything is in the title ... can someone provide me with a sample code to apply a gaussian blur only to a rectangular part of the picture (rectangle defined by its coordinates + dimensions). Thanks in advance for your help
  Phoceis 
            
  
         
     | 
	
    | 
         
             
     | 
	
    
         
            
         
     | 
    | 
        
     | 
        
        
        
         
		   
        
            
            
	
    
        
Rank: Advanced Member
  Groups: Guest
 Joined: 7/28/2003(UTC) Posts: 1,660
  Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
  
 
     | 
	
    
        
            
	      
                Try this: Code:Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
bitmap.Load(@"c:\temp\DSCF9099.jpg");
Aurigma.GraphicsMill.BitmapData data = bitmap.LockBits(100, 100, 600, 400);
Aurigma.GraphicsMill.Transforms.Blur blur = new Aurigma.GraphicsMill.Transforms.Blur();
blur.Type = Aurigma.GraphicsMill.Transforms.BlurType.Gaussian;
blur.Radius = 20;
blur.ApplyTransform(data);
bitmap.UnlockBits(data);
bitmap.Save(@"c:\result.jpg"); 
 Edited by user Wednesday, September 3, 2008 5:32:41 AM(UTC)
 | Reason: Not specified    | 
Best regards,  Fedor Skvortsov 
            
  
         
     | 
	
    | 
         
             
     | 
	
    
         
            
         
     | 
    | 
        
     | 
        
        
        
    
		
        
            
            
	
    
        
Rank: Newbie
  Groups: Guest
 Joined: 9/3/2008(UTC) Posts: 2
  
 
     | 
	
    
        
     | 
	
    | 
         
             
     | 
	
    
         
            
         
     | 
    | 
        
     | 
        
        
        
    
Aurigma Forums
 » 
Graphics Mill
 » 
Discussions – Graphics Mill
 » 
Apply blur only to a rectangular part of a bitmap
 
    
        Forum Jump
         
    
    You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.