#!/usr/bin/perl
# 
#  Image.pm - An object orientated wrapper for the perl Image::Size library.
# 
#  Copyright (C) 2002 Stefan Pfetzing
# 
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
# 

# define the Package name
package Oroborus::Image;

#use Apache::Reload;
use strict;
use Image::Size;

# constructor needs one argument, a filename of an image.
sub new($) {
	my $proto = shift();
	my $image = shift();
	my $class = ref($proto) || $proto;
	my $self  = {};
	bless ($self, $class);
	($self->{_XSIZE}, $self->{_YSIZE}) = imgsize($image);
	return $self;
}

# destructor
sub DESTROY() {
};

sub getX() {
	my $self = shift();
	return $self->{_XSIZE};
}

sub getY() {
	my $self = shift();
	return $self->{_YSIZE};
}

# return a true value
1;
__END__


