  | 
    
 
  
    
    
      
        
          
         Author | 
        
         Topic: Save sketch to JPEG/PNG  (Read 9173 times) | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            rdaniel 
 
     
      
             | 
            
            
            
              
                
                Re: Save sketch to JPEG/PNG 
                « Reply #30 on: Feb 11th, 2004, 6:39am » | 
                
                
 
                 | 
               
             
             
            
            Does this only work locally or can it work on a server? I've gotten it to work locally but when I put it online, I can't make an image. I've tried changing the permissions of the directory I'm using but that didn't fly.       Am I trying something that won't work or am I just going about it the wrong way?      Thanks,   daniel 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            mKoser 
 
                  
      
             | 
            
            
            
              
                
                Re: Save sketch to JPEG/PNG 
                « Reply #31 on: Feb 11th, 2004, 1:49pm » | 
                
                
 
                 | 
               
             
             
            
            sadly you can't get stuff like file-IO working in a browser because of security issues - browsers simply don't allow much stuff to happen!      + mikkel 
            
             | 
           
            
            
            
             mikkel crone koser | www.beyondthree.com   |    http://processing.beyondthree.com
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            Markavian 
  
        
      
             | 
            
            
            
              
                
                Re: Save sketch to JPEG/PNG 
                « Reply #32 on: Apr 14th, 2004, 11:32am » | 
                
                
 
                 | 
               
             
             
            
            Is there anyway to write this code as an includable module into the main code... you know, just to hide it out the way and pretend its a nice short bit of code?      php: include("filename.inc") e.g.? 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            gaza 
 
     
      
             | 
            
            
            
              
                
                Re: Save sketch to JPEG/PNG 
                « Reply #33 on: May 17th, 2004, 10:24pm » | 
                
                
 
                 | 
               
             
             
            
            has anyone been able to save EPS format?      all of this is amazing! 
            
             | 
           
            | 
            
            
            
             | 
           
         
         | 
       
     
     | 
   
 
  
    
    
      
        
        
          
            
            sspboyd 
 
     
      
             | 
            
            
            
              
                
                Re: Save sketch to JPEG/PNG 
                « Reply #34 on: Mar 15th, 2005, 2:56am » | 
                
                
 
                 | 
               
             
             
            
            I was running into trouble using the sample code from reply #20 with P69+ for mac ( 10.3.8 ) and win2K.      The images it produced looked like the scansize or the offset weren't right. I changed the code to use the other version of setRGB() and it worked.      I replaced this:    Code:| img.setRGB(0, 0, width, height, pixels, 0, height);  |  
  |      With this:    Code:  int x,y;     for(int i=0; i<pixels.length; i++){     x=i%width; y=i/width;     img.setRGB(x,y,pixels[i]);     }  |  
  |    
            
             | 
           
            
            
            
              
                | « Last Edit: Mar 15th, 2005, 4:20am by sspboyd » | 
                  | 
               
             
             gmail.com w/ sspboyd username
             | 
           
         
         | 
       
     
     | 
   
 
 
 |