
My default way of grabbing a figure from a paper has always been a screenshot of the PDF viewer, and the figure always looks a bit soft once it's on a slide or zoomed in a notebook. I assumed that was just what figures in papers look like. It isn't. I tried to measure how much I was losing on a real paper, and the answer for the figure I checked was roughly half the width.
The paper is RAG-Safety-Bench by Adithiyan Rajan Indira Saravanan and Kathleen C. Fraser (arXiv:2609.11758), 24 pages, published under CC BY 4.0, which is why I can show its figures here. I looked at the bar chart on page 6. Inside the PDF it's stored as an image of 1564×1080 pixels. On the page it's only printed about 272 points wide (a point is 1/72 inch), so the viewer draws it squeezed into a small box. Rendering the whole page at 216 DPI and cutting the figure out gave me 818×565. A screenshot at normal reading zoom lands in the same range: the chart as displayed, not the chart as stored. Zooming way in first gets more pixels, but those are the viewer's resampled copy, and honestly I never bother doing that per figure.
Checking every figure, not just one
One figure could be a fluke, so I used PyMuPDF to go through the whole paper and write down three numbers for every image it stores: its stored size in pixels, how wide it's printed on the page in points, and roughly how many pixels a 216 DPI render would give it, which is just the printed width divided by 72 and multiplied by 216. Each image is counted once, on the first page it appears. Before trusting the estimate I checked it against the page-6 crop above: 816 predicted vs 818 measured, the 2 px difference being my crop box.
There are 10 images. The page-1 figure is stored at 1476×786 but printed 218 pt wide, so a 216 DPI render gives it about 655 px, 44% of what's stored. The page-6 chart gets about 816 px of its 1564, 52%. Page 8 has two: 1779×1080 printed 363 pt wide gets 61%, and 1473×1280 printed 218 pt wide is back at 44%. The last six, on page 18 and pages 20 to 24, are all around 1960 px wide and all printed across the full 454 pt text width, and even those only get about 1361 px, 69% of their stored width.
Then I compared each file I extracted against the pixels stored in the PDF: convert both to RGB, subtract one from the other, and check that the difference is empty. All 10 of 10 matched. Pairing files with images by order works here because the extractor numbered them in the order they first appear, which I only confirmed by that 10/10.
Why the authors saved everything at 1.4 to 2.3 times the printed size, I don't really know. My guess is a high export DPI in their plotting setup, but that's a guess.
Getting the stored version
The extracted files came from ImgIng's Extract PDF images, with the whole 24-page PDF dropped in at once. It found 10 images, on pages 1, 6, 8 (two), 18 and 20 to 24, which matches my count, and saved them as one ZIP. Inside, the names run from "-image-001.png" to "-010.png" after the paper's ID, with no page numbers, so I kept the card list, or my own notes of the page numbers, next to the folder. The files are PNGs whose bytes differ from what's in the PDF, but every pixel is the same, which is what the comparison above checks.
This only works for figures that are bitmaps inside the PDF. Plenty of LaTeX papers include plots as vector PDF or EPS, and then there is no image to extract; when I tried a test page I'd drawn with nothing but shapes on it, the extractor reported 0 results. For those the fix goes the other way: render the page at a high DPI (I'd use 300) and crop, and since vector shapes stay sharp at any resolution, that's fine. I haven't yet tried a real paper with vector figures, so I can't say how common each case is. Also, if a publisher downsampled the figures before building the PDF, extraction can only give back what the PDF holds.
Licence is the part I used to skip. This paper is CC BY 4.0, so reusing its figures is allowed as long as the authors and source are credited, which is why the figure caption above names them. Lots of arXiv papers don't use CC BY; the licence line on the abstract page is where I look before putting a figure in anything that other people will see. The extractor I used is at https://imging.ai/ if you want to try it on a paper you're allowed to reuse.

Top comments (0)