0
$\begingroup$

I am trying to make a video by generating many images of a process, exporting them to the disk by the Export command in the PNG format, and finally making a video with FFmpeg.

My images have a title on the top with the values of the parameters. I optimized the font size of the title. When I show these images in the Mathematica notebook and save them by rightclicking and choosing "Save graphics as", I obtain saved images that look the same as in the Mathematica notebook.

However, when I save the images with the Export command, the titles have a much smaller font.

Why does this happen and how it can be fixed? I was unable to find any discussion of this problem. Apparently, it is supposed that the exported images should be OK and there should be no such problem.

I am using Mathematica 14 on Windows 11 but I also have earlier versions installed.

Dmitry

$\endgroup$
3
  • $\begingroup$ Could you post an example with code? With a plot, for example ParametricPlot[{Cos[u], Sin[u]}, {u, 0, 2 Pi}, PlotLabel -> "Title", ImageSize -> 200] I get nearly identical images with "Save graphic as" and Export. $\endgroup$
    – MelaGo
    Commented Apr 10 at 2:06
  • $\begingroup$ I made the images with ListPlot[,,,,,ImageSize->FrameSize] and FrameSize=800 defined above. However, in the Export command I used Export[....,ImageSize->{1334,1350}] that was a mistake. Now I am using xport[....,ImageSize->{FrameSize,FrameSize},ImageResolution->72] that works fine. $\endgroup$ Commented Apr 12 at 1:05
  • $\begingroup$ Why the numbers {1334,1350}? First, I exported images without size and resolution. I assumed the size would be the same as in the image generation. I haven't looked at the sizes of the exported images and tried to make a video with ffmpeg. However, I've got an error because not all frames had even dimensions that were required by ffmpeg. The dimensions fluctuated plus/minus one pixel. Still, I was not alerted by the images being larger than intended, and I simply added the command ImageSize->{1334,1350} preserving the size of exported images but forcing their dimensions even. $\endgroup$ Commented Apr 12 at 1:18

1 Answer 1

0
$\begingroup$

Sorry for the trouble, I have found the answer. In the Export command, I defined ImageSize larger than ImageSize of the generated image, this is why the font size in the output looked small.

This is a silly problem, I know, but my attention was distracted by other problems with making videos. I will report on them in another post.

Dmitry

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.