<?xml version="1.0"?>
<page id="Gimp.Parasite.get_data"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="Gimp.Parasite" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Array(Number(gchar))</api:type>
      </api:returns>
      <api:name>gimp_parasite_get_data</api:name>
    </api:function>
  </info>
  <title>Gimp.Parasite.prototype.get_data</title>
  <synopsis><code mime="text/x-gjs">
function get_data(): [return_value: Array(Number(gchar)), num_bytes: Number(guint32)] {
    // Gjs wrapper for gimp_parasite_get_data()
}
  </code></synopsis>
  <p>Gets the parasite's data. It may not necessarily be text, nor is it
guaranteed to be <code>null</code>-terminated. It is your responsibility to know
how to deal with this data.
Even when you expect a nul-terminated string, it is advised not to
assume the returned data to be, as parasites can be edited by third
party scripts. You may end up reading out-of-bounds data. So you
should only ignore <code>num_bytes</code> when you all you care about is checking
if the parasite has contents.</p>

<terms>
<item>
<title><code>return_value</code></title>
  <p>parasite's data.</p>
</item>
<item>
<title><code>num_bytes</code></title>
  <p>size of the returned data.</p>
</item>
</terms>

</page>
