[Thread Prev][Thread Next][Index]

Re: [ferret_users] Frame/file= and Framing of the output image



Dear Ryo,
This morning I did try the convert command that I found on the web (https://superuser.com/questions/802569/how-to-distill-rasterize-a-pdf-in-linux).
Strangely, the output of convert +antialias -density 600 Map_01.pdf test2.png is black and white.
Without the +antialias option, the colors of my map remain but white lines appear when I zoom on my black coasts.
Have a nice day,
Serena
.¸. , . .·´¯`·
 ><(((º>     `·.¸.·´¯`·...¸><(((º>¸.¸. , . .·´¯`· ><(((º> .
`·.¸.·´¯`·...¸><(((º>                                                    .
                                                                                  .
  Serena ILLIG-THEVENIN       LEGOS/IRD             .
                                                                                  .
  Editorial Board Member for Scientific Reports      .
                                                                              .
                         14 Av. E. Belin                           .
                         31400 Toulouse                        .
                         FRANCE                                   .
                                                                             .
         E-mail : serena.illig.ird@xxxxxxxxx             .
         Web-site : http://sillig.free.fr                       .
         Phone : +33 5 61 33 29 26                      .
                                                                       .
                                                     <º)))><..·



On Fri, Jul 8, 2022 at 3:42 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Dear Serena and Andrew,

I should "Rasterize" the resulting PDF as suggested by Ryo. But it seems a lot of work around to get my graphic outputs).


Here is a self-contained demonstration:

set window/outline=0
set data coads_climatology
fill/L=1 SST
go fland
SPAWN rm tmp.pdf
frame/file=tmp.pdf
SPAWN convert -density 600 tmp.pdf tmp1.png
SPAWN convert +antialias -density 600 tmp.pdf tmp2.png

We first generate a PDF file (tmp.pdf) and convert it to PNG, first with antialiasing (tmp1.png) and then without (tmp2.png).

You need the "convert" command from the "Imagemagick" package.

You may want to adjust the pixel density.  In the above demonstration I used 600 dpi.

-  600 dpi is usually sufficient for publication but perhaps overkill for presentation slides. Also it takes a lot of time to convert PDF to PNG at this high resolution.

-  But, low-resolution rasterization looks terrible without antialiasing.

I do agree with Ryo and hope that PyFerret will be modified so that the framing will be improved and that white lines don't happen in the PNG outputs.

If the underlying library (Qt ?) offers an option of switching antialiasing off, then PyFerret could in principle offer such an option.

Best regards,

Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement