-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image upscaled for no apparent reason #1277
Comments
well I can no access the real images and without them it is difficult to say something. Probably they have different resolution. You should also check if pdflatex renders them differently too and not only xelatex. |
if you use pdflatex the size is obtained by running
for the first and
for the second. So it is not really a latex issue as it is being given different sizes. The images are the same in pixel size but have different metadata setting resolution gimp shows the first as gimp shows the second as |
@davidcarlisle that's very interesting. I will admit I don't know much about image metadata. I also accept that I may be entirely in the wrong place with this. I assumed, apparently incorrectly? that the print size would be the number of pixels divided by the DPI. Windows, at least, reports a DPI of 96 for both images and the same size in pixels. Is the offending image's metadata internally inconsistent? It still looks to me like LaTeX, apparently through extractbb, is looking at different data than other programs are. Is there a standard for this that someone isn't adhering to? |
Relevant docs
|
I used a different resizer for the image and sent it to my customer, and it still didn't work. It turns out that Gmail also resizes images (for file size, not pixels) and it causes the exact same issue. I wish I knew what image tools are being used under the hood so that I could submit a bug report there. Images shouldn't scale differently because they've been emailed at some point. |
you shouldn't sent important binary images as email attachments (or perhaps even embedded in some html). At least put them inside a zip. |
I agree things shouldn't auto-resize, but that's not a LaTeX issue ;) |
Brief outline of the bug
I encountered an issue where an image was upscaled by about a third and I don't know why. It seems to be specific to the image, which was resized down using https://imageresizer.com/. I also used another method to scale down the same image and every other application agrees that the two included images are identical in size. But somehow, when I compile them in LaTeX there is a very obvious difference.
Minimal example showing the bug
I included the two images below. As you can see, they're two identical red triangles. Somewhere in LaTeX internals the decision is made that one of them should be about 33% bigger.
Log file (required) and possibly PDF file
test.log
test.pdf
The text was updated successfully, but these errors were encountered: