none
How to Upload Image from C#/WPF app to ImageShack or Imgur RRS feed

  • Question

  • I want to make a C#/WPF app that uploads images to ImageShack or Imgur then shows the URL to that image. What I need now is how can I upload an Image from C#/WPF to those services. In a web application, I would use a File Input field, in a WPF/C# app what do I use? I am not sure how i must "encode" and send the image? The ImageShack client is quite vague so i looked at the Imgur 1 and i guess i should base64 encode my image then POST it to Imgur?

    ImageShack API

    • fileupload; (input type="file") - image or video file. Mandatory unless url parameter is specified.
    • frmupload; (input type="file") - video default frame picture. Optional, used only for video upload. When you uploading your video you could supply a default frame that will be displayed when video is stopped. Dimensions of this image should be the same as video file's ones to avoid artefacts on screen.
    • url; This parameter indicates that transload method is used instead of upload
    • optsize; resize options for image in form WxH if image is uploaded/transloaded. No impact on video uploads.
    • rembar; Developer could tell to ImageShack to leave/remove information bar on thumbnail image generated by ImageShack . If you've supplied this parameter as yes or as 1 then generated thumbmail will have no information bar. No impact on video uploads
    • tags; A comma-separated list of tags to add to your video/image. E.g. family,picture. Optional
    • public; Public/private marker of your video/picture. yes means public (default), no means private. Optional
    • cookie; Registration code, optional.
    • a_username; Username, optional.
    • a_password; Password, optional.
    • key; Your DeveloperKey. Mandatory.

    Imgur API

    • key required GET / POST Your API developer key
    • image required POST A binary file, base64 data, or a URL
    • type optional POST The type of file that's being sent in. Accepted values: file, base64, url
    • name optional GET / POST The name of the file. This is automatically detected if uploading a file with POST and multipart/form-data.
    • title optional GET / POST The title of the image, in order to supply context. This shows up on the Imgur website.
    • caption optional GET / POST The caption of the image, in order to supply even more context. This shows up on the Imgur website.
    • Moved by Mike Dos Zhang Tuesday, October 5, 2010 6:14 AM third party develop question (From:Visual C# General)
    Saturday, October 2, 2010 12:35 AM

All replies