[Bio] / Sprout / ERDBTypeImage.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDBTypeImage.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Mon Jan 19 21:46:21 2009 UTC revision 1.3, Thu May 28 18:08:05 2009 UTC
# Line 25  Line 25 
25      use GD;      use GD;
26      use FIGRules;      use FIGRules;
27      use MIME::Base64;      use MIME::Base64;
28        use ERDBExtras;
29      use base qw(ERDBType);      use base qw(ERDBType);
30    
31  =head1 ERDB Image Type Definition  =head1 ERDB Image Type Definition
# Line 292  Line 293 
293      # to a temporary file.      # to a temporary file.
294      my $sessionID = FIGRules::NewSessionID();      my $sessionID = FIGRules::NewSessionID();
295      my $fileName = FIGRules::NewSessionID() . "image$$.png";      my $fileName = FIGRules::NewSessionID() . "image$$.png";
296      my $oh = Open(undef, ">$FIG_Config::temp/$fileName");      my $oh = Open(undef, ">$ERDBExtras::temp/$fileName");
297      print $oh $value->png();      print $oh $value->png();
298      close $oh;      close $oh;
299      my $retVal = CGI::img({ src => "$FIG_Config::temp_url/$fileName" });      my $retVal = CGI::img({ src => "$ERDBExtras::temp_url/$fileName" });
300      return $retVal;      return $retVal;
301  }  }
302    
303    =head3 objectType
304    
305        my $type = $et->objectType();
306    
307    Return the PERL type for fields of this type. An undefined value means it's
308    a scalar; otherwise, it should be the package name (suitable for a C<use> clause).
309    
310    =cut
311    
312    sub objectType {
313        return "GD::Image";
314    }
315    
316  1;  1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3