PDF vs. PNG figure: why does figure load so much faster even if file sizes are the same?Problem with...
What does 思ってやっている mean?
How can one's career as a reviewer be ended?
Return a String containing only alphabets without spaces
What would be the way to say "just saying" in German? (Not the literal translation)
Why not invest in precious metals?
Why are MBA programs closing?
How do photos of the same subject compare between the Nikon D700 and D70?
Why does this query, missing a FROM clause, not error out?
Is it possible for a vehicle to be manufactured without a catalytic converter?
Generate basis elements of the Steenrod algebra
Is it expected that a reader will skip parts of what you write?
Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?
Should I put programming books I wrote a few years ago on my resume?
Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?
Are there any normal animals in Pokemon universe?
New bike, tubeless tire will not inflate
What are neighboring ports?
Why did Intel abandon unified CPU cache?
Why can my keyboard only digest 6 keypresses at a time?
How to hide rifle during medieval town entrance inspection?
Why am I getting a strange double quote (“) in Open Office instead of the ordinary one (")?
Can a human be transformed into a Mind Flayer?
Origin of "boor"
Why am I Seeing A Weird "Notch" on the Data Line For Some Logical 1s?
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 9 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
2 hours 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
2 hours 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
2 hours 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 8 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
2 hours 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
2 hours 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
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
2 hours 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