Creating support for image hoster?

Bubelbub
2014-04-18
2014-06-09
  • Bubelbub
    Bubelbub
    2014-04-18

    Hello,

    It is possible to add a plugin or something else to support a other image hoster?
    I like abload.de and could create a plugin (or something else) for the image hoster.

    It is possible?
    If yes, how?
    If no, why?

    Thanks in advance and great easter,
    Bubelbub

     
  • Robin Krom
    Robin Krom
    2014-04-27

    Hi,

    Sure, this is possible.

    You can either use the external command plugin, and write a batch script or use an existing application.

    Or you can write a plugin for Greenshot yourself, but this is currently not very easy. I am working on making it easier, but you will still need to be able to program with .NET. You can have a look at our bitbucket git repository, there is an example plugin (and others)

    Best wishes,
    Robin

     
  • Bubelbub
    Bubelbub
    2014-05-01

    Ah thank you.
    Now i see this repository
    https://bitbucket.org/greenshot/greenshot/overview

    Is it possible to use merge requests like on github.com??

    I could develope the plugin in .NET. I think thats really easy :)
    If i have a result i'll send it to you via the repository or via patch file.

    Thanks!

     
  • Robin Krom
    Robin Krom
    2014-05-01

    Yes, github and bitbucket are very simular.
    And We would be very happy to have more people develop code!

    For Greenshot 1.x we have quite a lot of restrictions: you should use .NET 2.0 (or max 3.5) and not use any libraries which make the plugin huge... We would not supply it with Greenshot if makes Greenshot a lot bigger...

    For Greenshot 2.x things are a bit different, first you can use .NET 4.5! We didn't decide yet what other libraries are going to be included, so everything is still possible. And I would like to make plugins downloadable, having less restrictions on the size...

    But 2.x is instable, everything is being redesigned which makes it hard for you to develop for it...

    To get your image hoster supported by Greenshot it would be the easiest if you supply the code to upload which accepts a stream and e.g a filename and I can add it to our code.

    This saves us the research, and you the steep learning curve for Greenshot 1.x

    For 2.x there will be documentation some time this year.

    Best wishes,
    Robin

     
  • Bubelbub
    Bubelbub
    2014-05-05

    Hello Robin,

    i think that would be a really great idea.

    Say me the name of the file which you need for Abload.de.
    For example:
    ./greenshot/GreenshotImgurPlugin/ImgurDestination.cs

    There is a override of the "ExportCapture" function. (for example)

    Or how i could help you to support Abload.de faster?
    A new C# (.NET 2.0) application which supports a simple upload?

    Thanks!

     
  • Robin Krom
    Robin Krom
    2014-05-05

    ;-)

    I don't care how it's called, just need code which accepts a stream (which will be the .png oder .jpg etc), filename, and uploads it to abload.de
    After the upload I would like to get a url to the image returned, so I can store or show the URL.

    Abload.de has some restrictions:
    https://github.com/Bubelbub/Abload.de-Tools
    So, you should only "use" the image.php link, and not link directly.
    Although we don't show ads in Greenshot itself, if a service only allows the people to use it like that than we do so. :)

    Best would be if it is written for .net 2.0, and doesn't use any libraries...
    But if you tell me what you need, maybe I have some solution.

    Best wishes,
    Robin

     
  • Bubelbub
    Bubelbub
    2014-06-09

    Hello Robin,

    sorry for late answer. I was away for few weeks.

    I developed your github example ^^
    Because that i know the restrictions.

    Take a look at this pastebin...
    http://pastebin.com/7f1Qzd1M

    And this Microsoft Visual C# 2010 Express Project...
    http://www.file-upload.net/download-9031656/SimpleAbload.zip.html

    I modified the upload.php so that you get the direct link back, if you use the linkonly parameter.
    So you mustnt open the uploadComplete.php.
    And you mustnt search the correct things per regex.

    I hope thats helps you :)

    Yours,
    Bubelbub

     
  • Robin Krom
    Robin Krom
    2014-06-09

    Schaut nicht so kompliziert aus, danke Patrick ;-)

    Will have a look at it next week, currently the temperature really doesn't invite me to sit behind my PC. And I currently have a lot of bugs to fix for the coming Greenshot 1.2

    Best wishes,
    Robin