<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">As David said it's not NCL but imagemagick.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><a href="http://www.imagemagick.org/Usage/crop/#trim">http://www.imagemagick.org/Usage/crop/#trim</a><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">" First is like "-crop", "-trim" will retain the canvas size of the image."</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">GIF isn't a very complex format and doesn't know what to do with the empty space so makes it black. Different viewers will probably handle it differently. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">from the above page again:</div><div class="gmail_default" style="font-family:verdana,sans-serif">"However if you don't care about this information, just junk it by resetting the page information of the image either using a "+repage" operator, or saving to a format that does not save canvas information (such as the JPEG format). Here we do both, to make it clear, that we are junking the canvas information."</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 24, 2015 at 12:24 PM, Sebastian Otarola-Bustos <span dir="ltr"><<a href="mailto:Sebastian.F.Otarola-Bustos.1@nd.edu" target="_blank">Sebastian.F.Otarola-Bustos.1@nd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm not sure what was the error, but I followed your suggestion and now works fine.<br><br><br><br>All the best,<br>Sebastián. <br><br><br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 23, 2015 at 6:53 PM, David Jones <span dir="ltr"><<a href="mailto:jonesd647@yahoo.ca" target="_blank">jonesd647@yahoo.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12px"><div dir="ltr"><span>Not an NCL problem, but you could try "convert -trim +repage".</span></div><div dir="ltr"><br><span></span></div><div dir="ltr"><span>Good luck,</span></div><div dir="ltr"><span>Dave.</span></div> <br><div><br><br></div><div style="display:block"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, September 23, 2015 11:25 PM, "<a href="mailto:ncl-talk-request@ucar.edu" target="_blank">ncl-talk-request@ucar.edu</a>" <<a href="mailto:ncl-talk-request@ucar.edu" target="_blank">ncl-talk-request@ucar.edu</a>> wrote:<br> </font> </div> <br><br> <div>----------------------------------------------------------------------<br><br>Date: Wed, 23 Sep 2015 15:24:47 -0300<br>From: Sebastian Otarola-Bustos <<a href="mailto:Sebastian.F.Otarola-Bustos.1@nd.edu" target="_blank">Sebastian.F.Otarola-Bustos.1@nd.edu</a>><br>Subject: [ncl-talk] PNG trim error before doing animated Gif, all the<br> space outside the trimmed area now is black colored.<br>To: "<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>Message-ID:<br> <CAO9pyik1_R50FwZwhs=<a href="mailto:VcywLhovGSLEnx5LGkm0LkMtX4E1X7w@mail.gmail.com" target="_blank">VcywLhovGSLEnx5LGkm0LkMtX4E1X7w@mail.gmail.com</a>><br>Content-Type: text/plain; charset="utf-8"<span><br><br>Hi everybody,<br><br>I've been making animations without troubles converting .png to .gif using<br>the following commands: convert -trim & convert -delay, so I'm cutting the<br>white space with trim and then doing the animation with -delay. The strange<br>thing is that if I see each .png file separately, it's cutted ok, as it<br>showns in Figure1, but after doing the animation with the cutted files, you<br>can see the trimmed area, but the difference between the cutted area and<br>the original size is all filled with black as you can see in Figure2. Here<br>you can see the main steps of my scripts:<br><br><br></span> *do n=0,ntimes-1,4*<br><br>* wks_type = "png"*<br>* <a href="mailto:wks_type@wkWidth" target="_blank">wks_type@wkWidth</a> = 1700*<br>* <a href="mailto:wks_type@wkHeight" target="_blank">wks_type@wkHeight</a> = 1700*<br>* wks = gsn_open_wks("png","animate"+sprinti("%03i",n)) ;<br>animate_000.png, animate_001.png, etc*<br>* print("Trabajando en el tiempo: " + times(n))*<br>* <a href="mailto:mpres@gsnRightString" target="_blank">mpres@gsnRightString</a> = " Velocity(m/s): "+ times(n)*<br>* <a href="mailto:mpres@gsnLeftString" target="_blank">mpres@gsnLeftString</a> = " "*<br><br>* mpid = gsn_csm_map(wks,mpres)*<br>* V = gsn_csm_contour(wks,speed(n,:,:),spres)*<br>* wind = gsn_csm_vector(wks,u(n,:,:),v(n,:,:),Vres)*<br>* Heig =gsn_csm_contour(wks,ter(:,:),ter_res)*<br><br>* overlay(mpid,V)*<br>* overlay(mpid,Heig)*<br>* overlay(mpid,wind)*<br>* maximize_output(wks,True)*<br>* delete(wks)*<br>* cmd="convert -trim animate"+sprinti("%03i",n)+".png<br>"+"animate"+sprinti("%03i",n)+".png"*<br>* system(cmd)*<br><br><br>* end doINS = "convert -delay 50 animate*.png velocity_3.gif" system(INS)*<span><br><br>I still cannot see the error, and any help would be really appreciated as<br>always,<br><br>All the best,<br>Thank you very much,<br></span>Sebasti?n.<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0001.html" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0001.html </a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: Figure_1.PNG<br>Type: image/png<br>Size: 124596 bytes<br>Desc: not available<br>Url : <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0002.png" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0002.png</a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: Figure_2.PNG<br>Type: image/png<br>Size: 109313 bytes<br>Desc: not available<br>Url : <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0003.png" target="_blank">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150923/544fdb0d/attachment-0003.png </a><br><br>------------------------------<br></div> </div> </div> </div></div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>