PDF vs. PNG figure: why does figure load so much faster even if file sizes are the same?Problem with positioning a figure environment inside resizeboxChoosing whether to include PDF or PNG in PDFLaTeXInserting .pdf created in Visio to LaTeX without whitespacePDF-format causes figure to be moved to end of chapterReplicating figure in another document with same numberingWhy do my PDF figures in PDFTeX look bad in print?preserving pixel resolution when converting to PDFMatplotlib PDF figures blurry when printedIncluded PDF vector is missing objectsThin Lines from PDF Figure in Latex get thicker when exported to final PDF
Explain the ending of Black Mirror's "Smithereens"
Is it legal for a bar bouncer to confiscate a fake ID
Ability To Change Root User Password (Vulnerability?)
Advantages of the Exponential Family: why should we study it and use it?
How can I make 12 tone and atonal melodies sound interesting?
Why does this query, missing a FROM clause, not error out?
What would be the way to say "just saying" in German? (Not the literal translation)
The Frozen Wastes
How can I deal with uncomfortable silence from my partner?
Getting UPS Power from One Room to Another
bash does not know the letter 'p'
A map of non-pathological topology?
How to publish items after pipeline is finished?
What are some really overused phrases in French that are common nowadays?
Is it possible to fly backward if you have really strong headwind?
Scientist couple raises alien baby
Why Does Mama Coco Look Old After Going to the Other World?
With Ubuntu 18.04, how can I have a hot corner that locks the computer?
How to trick the reader into thinking they're following a redshirt instead of the protagonist?
color rows on table (Tabu package)
Is it possible for a vehicle to be manufactured without a catalytic converter?
Are there any normal animals in Pokemon universe?
Why are MBA programs closing?
What should I write in an apology letter, since I have decided not to join a company after accepting an offer letter
PDF vs. PNG figure: why does figure load so much faster even if file sizes are the same?
Problem with positioning a figure environment inside resizeboxChoosing whether to include PDF or PNG in PDFLaTeXInserting .pdf created in Visio to LaTeX without whitespacePDF-format causes figure to be moved to end of chapterReplicating figure in another document with same numberingWhy do my PDF figures in PDFTeX look bad in print?preserving pixel resolution when converting to PDFMatplotlib PDF figures blurry when printedIncluded PDF vector is missing objectsThin Lines from PDF Figure in Latex get thicker when exported to final PDF
I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.
Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.
Why is it that the smaller PDF figure takes so much longer to load?
floats pdf png
add a comment |
I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.
Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.
Why is it that the smaller PDF figure takes so much longer to load?
floats pdf png
add a comment |
I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.
Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.
Why is it that the smaller PDF figure takes so much longer to load?
floats pdf png
I have some figures I'm making that consist of tens of thousands of points. The PDF version of one of these figures is 1.1 MB, while the PNG version is 1.3 MB (both figures generated with the matplotlib module of Python). I have dpi set to 400 for my PNG, overkill relative to the standard I know but I wanted to keep good resolution even if people zoom in on it.
Since the PDF version of the figure is slightly smaller, I figured that would be better to use as far as document load time is concerned. However, in my compiled document (compiled with pdflatex), the slightly larger PNG version of the figure appears virtually instantly, while it takes several seconds for the PDF version of the figure to load in the document.
Why is it that the smaller PDF figure takes so much longer to load?
floats pdf png
floats pdf png
edited 8 hours ago
NeutronStar
asked 8 hours ago
NeutronStarNeutronStar
222139
222139
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).
a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.
A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.
In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494691%2fpdf-vs-png-figure-why-does-figure-load-so-much-faster-even-if-file-sizes-are-t%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).
a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.
A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.
In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
add a comment |
This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).
a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.
A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.
In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
add a comment |
This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).
a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.
A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.
In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.
This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.).
a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it.
A vector graphic can be extremely complex, consisting of many object that the viewer needs to draw one at a time.
In your case, you have a vector graphic with 10,000s of objects which individually needs to be drawn. These objects can be dots, lines, curves, colour blocks, text which also include the font, etc... This will take a very long time. You might be able to make it faster by optimising the pdf but you will still have 10,000s of objects to draw.
edited 7 hours ago
answered 8 hours ago
ArTourterArTourter
11.4k43853
11.4k43853
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
add a comment |
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
3
3
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
Just as supplement: The pdf inclusion is faster because the engine only needs to copy the PDF stream into the final PDF. For PNG there needs to be a conversion.
– TeXnician
7 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@KJO I referred to the compile time. That's why I called it a supplement. The viewer perspective is nicely covered by this answer.
– TeXnician
2 hours ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
@TeXnician agreed as a supplement to the answer it is relevant to the compile/compression this comment will self destruct eventually :-)
– KJO
1 hour ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494691%2fpdf-vs-png-figure-why-does-figure-load-so-much-faster-even-if-file-sizes-are-t%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown