@@ -0,0 +1,1373 @@
+#!/usr/bin/python%0A%0Afrom gimpfu import *%0Aimport time%0Aimport base64%0Aimport json%0A%0Aclient_id = %2275272777892320e%22%0A%0Adef upload_image(path):%0A    %22%22%22%0A    Upload an image from a given path to Imgur. Uses the urllib2 library%0A    to ensure we don't need third-party dependencies for this package.%0A    %22%22%22%0A    import urllib%0A    import urllib2%0A%0A    with open(path, %22rb%22) as image_file:%0A        args = %7B 'image': base64.b64encode(image_file.read()) %7D%0A%0A    request = urllib2.Request('https://api.imgur.com/3/image')%0A    request.add_header('Authorization', %22Client-ID %22 + client_id)%0A%0A    request.add_data(urllib.urlencode(args))%0A    return json.loads(urllib2.urlopen(request).read())%5B'data'%5D%0A%0A%0Adef plugin_main(image, layer):%0A    image = pdb.gimp_image_duplicate(image)%0A    layer = pdb.gimp_image_merge_visible_layers(image, CLIP_TO_IMAGE)%0A    pdb.file_png_save2(image, layer, %22/tmp/imgur_upload.png%22,%22imgur_upload.png%22, 0,5,0,0,0,0,0,0,0)%0A    imgur = upload_image('/tmp/imgur_upload.png')%0A    print imgur%5B'link'%5D%0A    gimp.message(%22Sucessfully uploaded!%5Cn%7B%7D%22.format(imgur%5B'link'%5D))%0A%0A%0Aregister(%0A        %22imgur_uploader%22,%0A        %22Save and upload the image to Imgur%22,%0A        %22Save and upload the image to Imgur%22,%0A        %22Evan Tschuy%22,%0A        %22MIT License%22,%0A        %222015%22,%0A        %22%3CImage%3E/File/Upload to Imgur%22,%0A        %22RGB*, GRAY*%22,%0A        %5B%5D,%0A        %5B%5D,%0A        plugin_main)%0A%0Amain()%0A

Add GIMP plugin