Bio::Phylo::Treedrawer::Jpeg - Graphics format writer used by treedrawer, no


Bio-Phylo documentation Contained in the Bio-Phylo distribution.

Index


Code Index:

NAME

Top

Bio::Phylo::Treedrawer::Jpeg - Graphics format writer used by treedrawer, no serviceable parts inside

DESCRIPTION

Top

This module creates a jpeg file from a Bio::Phylo::Forest::DrawTree object. It is called by the Bio::Phylo::Treedrawer object, so look there to learn how to create tree drawings.

SEE ALSO

Top

Bio::Phylo::Treedrawer

The jpeg treedrawer is called by the Bio::Phylo::Treedrawer object. Look there to learn how to create tree drawings.

Bio::Phylo::Manual

Also see the manual: Bio::Phylo::Manual and http://rutgervos.blogspot.com.

CITATION

Top

If you use Bio::Phylo in published research, please cite it:

Rutger A Vos, Jason Caravas, Klaas Hartmann, Mark A Jensen and Chase Miller, 2011. Bio::Phylo - phyloinformatic analysis using Perl. BMC Bioinformatics 12:63. http://dx.doi.org/10.1186/1471-2105-12-63

REVISION

Top

 $Id: Jpeg.pm 1660 2011-04-02 18:29:40Z rvos $


Bio-Phylo documentation Contained in the Bio-Phylo distribution.
package Bio::Phylo::Treedrawer::Jpeg;
use strict;
use Bio::Phylo::Util::Dependency 'Bio::Phylo::Treedrawer::Png';
use Bio::Phylo::Util::Exceptions 'throw';
use base 'Bio::Phylo::Treedrawer::Png';

sub _finish {
    my $self = shift;
    my $jpg;
    eval { $jpg = $self->_api->jpeg };
    if ( not $@ ) {
        return $jpg;
    }
    else {
        throw 'ExtensionError' =>
          "Can't create JPEG, libgd probably not compiled with it";
    }
}

1;