Quantcast

_export

Specifies a destination for the edited image.

Remarks

Use the _export parameter to tell Picnik where to send the user's image when he or she is done editing it. An additional button is added to the Picnik user interface to allow the user to send the image back to your website. The _export parameter should be a fully-qualified URL. Be sure to encode it first (such as with PHP's rawurlencode or Javascript's encodeURIComponent) if you're doing an HTTP GET and passing the _export URL as a parameter embedded in another URL.

Several other optional parameters are often used along with the _export parameter:

  • _export_title: Text to display on the export button instead of "export".
  • _export_agent: Whether to send a URL to the edited image or to post the image data directly.
  • _redirect: A URL to redirect to after the export is complete.
  • _export_method: Whether to export via HTTP GET or HTTP POST.
  • _export_field: The name of the form field in which to place the exported image data.
  • _host_name: A user-readable name for the site being exported to.

Note that the user will also be able to use Picnik's Save & Share tab to save the photo to any of the destinations which Picnik supports. See the _exclude parameter for more information about customizing the Picnik interface.

See Also

_import, _export_title, _export_agent, _redirect, _export_method, _export_field, _host_name

Samples

Round-trip image editing (via HTTP GET)


Edit This Image And Export It Back To Me!

http://www.picnik.com/service/?_apikey=YourApiKey&_import=http%3A//www.picnik.com/graphics/api/api_sample_1.jpg&_export=http%3A//www.picnik.com/info/api/reference/_export&_export_agent=browser

In this sample we're using the _export parameter to tell Picnik where to send the edited image. In this case, we're passing in the the URL of this page so that the result will come back here. We're also using the _export_agent parameter to control how the image data is delivered: specifying "browser" means that Picnik will send us a URL to the new image. Finally, we're using some Javascript code to look for the image URL in the page's GET parameters. If we find an image, we write out some HTML to the document so that it'll be displayed.