title: How to set image size using GD::Barcode
body: <p>I am using GD::Barcode to generate barcodes of course, but did not find a way to set the image width.
  How do I do that?
  Here is what I am doing in my (Mojolicious) application:</p>
  
  <pre><code>  #action that generates an image/png barcode which is embedded in the html
    use GD::Barcode::EAN8;
    use Time::Seconds
    sub barcode {
          my ($c) = @_;
          my $barcode_id = $c-&gt;stash('barcode_id');
          $c-&gt;app-&gt;log-&gt;debug('Generating barcode:' . $barcode_id);
          my $img_data = GD::Barcode::EAN8-&gt;new($barcode_id)-&gt;plot-&gt;png;
  
          $c-&gt;res-&gt;headers-&gt;content_type('image/png');
          $c-&gt;res-&gt;headers-&gt;header(
              'Cache-Control' =&gt; 'max-age=' . ONE_MONTH . ', must-revalidate, private');
          $c-&gt;render_data($img_data);
  
    }
  </code></pre>
  
  <p>Thanks.</p>