Daniil > Image-Imgur-0.01 > Image::Imgur

Download:
Image-Imgur-0.01.tgz

Dependencies

Annotate this POD (1)

View/Report Bugs
Source  

NAME ^

Image::Imgur - Perl extension for uploading images to http://imgur.com

SYNOPSIS ^

  use Image::Imgur;
  my $key = "IMGUR-API-KEY"; # dev key
  # if you don't have imgur api key, you can get one here: http://imgur.com/register/api/
  my $url1 = $img_up->upload('http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/intl/hdr-globe-east.gif');
  my $url2 = $img_up->upload('/usr/local/www/data/host.jpg');

DESCRIPTION ^

Image::Imgur intends to make programmatically possible to upload image files to the website http://imgur.com.

The maximum non-animated file size you can upload is 10MB. However, if the image is over 1MB then it will automatically be compressed or resized to 1MB, for better viewing on the net. The maximum animated file size (both GIF and PNG) is 2MB.

This module uses LWP and Moose (Mouse will work too). Also you'll need a working internet connection (duh).

Method Summary

host($image)

Given an url or a filename uploads the image to imagur.com and returns the url.

SEE ALSO ^

http://imgur.com LWP::UserAgent Moose

AUTHOR ^

D. Frumin, <lt>ohwow@cpan.org<gt>

COPYRIGHT AND LICENSE ^

Copyright (C) 2010 by Ivan Ivanov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: