NAME

Sledge::Plugin::ShowImage - plugin to show image from data

SYNOPSIS

package Your::Pages;
use Sledge::Plugin::ShowImage;
use Your::Data;

sub dispatch_foo {
    my $self  = shift;
    my $id    = $self->r->param('id');
    my $image = Your::Data->retrieve($id)->image;
    $self->show_image($image);
}

sub dispatch_bar {
    my $self  = shift;
    $self->show_1dot_img;
}

DESCRIPTION

DB などに保存されている画像を表示するためのプラグインです。1ドット画像を表 示する機能もついています。

show_image

引数で与えられた画像を表示します。

show_1dot_img

1ドット画像を表示します。HTTP::MobileAgent を利用して、端末ごとに最適な1 ドット画像を出力します。

DoCoMo 端末のみ gif を出力します。それ以外の端末には png を出力します。

DEPENDENCIES

HTTP::MobileAgent

AUTHOR

MATSUNO Tokuhiro <tokuhirom at gmail dot com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.