HEIC OCR: convert it first
Tesseract and a default OCRmyPDF refuse .heic. For a scan, convert on a Mac:
sips -s format jpeg in.heic --out in.jpg
0
net words Tesseract lost after sips, 10 scans
Read the .heic: $0.006 an image
Three tools refuse .heic
| Tool | What it printed |
|---|---|
| Tesseract 5.5.4 | Error during processing. |
| OCRmyPDF 17.13.0 |
cannot identify image file 'in.heic', then
UnsupportedImageFormatError
|
| Pillow 12.3.0 |
UnidentifiedImageError: cannot identify image file
'in.heic'
|
- Tesseract printed nothing else, on all 23 files. Its docs list HEIC as unsupported, and a maintainer wrote in 2023: "We don't plan to support the HEIC format".
Converted HEIC read like the same JPEG
| Path | Scans | Photos | Sideways |
|---|---|---|---|
| Tesseract on .heic | refused (96.0%) | refused (31.9%) | refused (0.7%) |
| sips, then Tesseract | 96.0% (96.0%) | 32.8% (31.9%) | 0.9% (0.7%) |
| magick or pillow-heif, then Tesseract | 96.1% (96.0%) | 33.1% (31.9%) | 84.8% (0.7%) |
| Apple Vision on .heic | 98.8% (98.8%) | 98.5% (98.5%) | 99.3% (99.3%) |
| Our Actor, after sips | 96.1% (96.2%) | 93.2% (93.6%) | 93.6% (92.6%) |
| Our Actor on .heic | 96.1% (96.2%) | 93.6% (93.6%) | 91.1% (92.6%) |
- On scans, every reader stayed within 2 words of its JPEG count. Apple Vision is the text reader built into macOS.
Sideways photos: sips keeps the turn
A phone can store a portrait photo on its side, with a tag saying which way is up. sips keeps the tag, and Tesseract ignores it.
| Path | Of 564 |
|---|---|
| sips, then Tesseract | 5 |
| magick or pillow-heif, then Tesseract | 478 |
| Apple Vision on .heic | 560 |
magick turns the pixels upright first:
magick in.heic out.png
tesseract out.png out
The same total as Tesseract on those photos stored upright.
HEIC to searchable PDF: two lines
sips -s format jpeg in.heic --out in.jpg
ocrmypdf --image-dpi 300 in.jpg out.pdf
| Second line | Words | Page |
|---|---|---|
ocrmypdf --image-dpi 300 |
1,852 | 6.4 x 10 in |
tesseract in.jpg out pdf |
1,877 | 27.4 x 43 to 44 in, 70 dpi |
- OCRmyPDF's gap is mostly word order. In any order it found 1,873, against 1,878.
-
Without
--image-dpi, OCRmyPDF stops, since sips writes 72 dpi:
DpiError: Input file is an image, but the resolution (DPI) is not credible.
OCRmyPDF reads .heic only with pillow-heif
Since v17.12.0, HEIC input is the opt-in
ocrmypdf[heic] extra, not in the default install, Docker
image or snap. Its pillow-heif wheels bundle libheif, libde265 and
x265, "making the wheel as a whole GPLv2-licensed", per OCRmyPDF's
docs.
In zsh, quote the extra:
pip install 'ocrmypdf[heic]'. With pillow-heif, my
OCRmyPDF took the .heic, but made bigger pages:
- 3 scans: about 3 MB a page, against 857 KB from their JPEGs.
- 3 sideways photos: over 5 MB a page, and 92 fewer words than magick, then Tesseract.
A whole folder: one sips line
mkdir -p jpg && sips -s format jpeg *.(heic|HEIC) --out jpg/
It writes one JPEG a file into jpg/. zsh matches case, so the pattern
names both. With only *.heic, a mixed folder skips its
.HEIC files, and a folder of .HEIC files stops with
zsh: no matches found: *.heic.
sips HEIC: a fifth smaller, harder to open
| Saved as | Scans | Photos |
|---|---|---|
| JPEG | 633.2 KB | 919.6 KB |
| HEIC, sips default | 502.0 KB | 712.0 KB |
- iPhone: Settings, Camera, Formats, Most Compatible. New photos are then JPEG, per Apple. High Efficiency goes back to HEIF.
- Windows: opening .heic may need the free HEIF Image Extension and HEVC Video Extensions ($0.99 in the US, Microsoft Store).
Our Actor reads .heic now
PDF OCR to Markdown, our Apify Actor, reads .heic as it is since build 0.1.139 (November 24). Before, it returned this error:
Unsupported file type. Supported: PDF, PNG, JPEG, WEBP and TIFF.
- $0.006 a scanned page or image, plus $0.00005 a run at 1 GB.
What I did not test
- Real iPhone camera files. Mine are made-up, converted by sips.
- Android or Samsung HEIC, AVIF, HEIC screenshots, Windows, Linux.
- Live Text, Preview export, Google Lens, Google Drive, online tools.
- RapidOCR and EasyOCR on .heic, and the PDF lines on sideways photos. Our Actor: scores from this Mac, one 24 MP file on Apify.
- More files. One photo is about a tenth of a Photos cell and a third of a Sideways cell.
How I tested it
- Scans: 10 proofread Wikisource book pages, 1920 px JPEGs, 1,955 words.
- Photos: the same pages drawn on a desk, made up. Sideways: 3 of them stored turned, with EXIF Orientation 6, 564 words.
- HEIC: sips -s format heic in.jpg --out in.heic, default quality, macOS 26.6.
- Score: true words found in order, against the known text. The JPEG numbers are from JPG to text.
- Readers: Tesseract 5.5.4, OCRmyPDF 17.13.0, Pillow 12.3.0.
- Converters: pillow-heif 1.8.1, ImageMagick 7.1.2-11. Apple Vision: VNRecognizeTextRequest, accurate, from Swift.
- Our Actor: its own code at build 0.1.137 after sips and at build 0.1.139 on .heic, text output, second reader on. Its JPEG numbers are from build 0.1.125.
- Scripts and results stay in our private repo, in research/bench/heic-ocr-2026-11-24/.
Sources
- Tesseract: input formats
- OCRmyPDF v17.14.2 source: docs/maintainers.md and release notes
- pillow-heif: licenses of the bundled libraries
- Microsoft Store: HEIF Image Extension and HEVC Video Extensions, US prices, Nov 24
- We make the Apify Actor, and none of the other tools here.
Questions people ask
Can Tesseract read HEIC files?
No. Tesseract 5.5.4 printed only "Error during processing." on all 23 .heic files. Convert first: a scan with sips on a Mac, a sideways phone photo with magick in.heic out.png.
How do I turn a HEIC into a searchable PDF for free?
On a Mac, convert with sips, then run ocrmypdf --image-dpi 300 in.jpg out.pdf. Without --image-dpi, OCRmyPDF stops with a DpiError. Tesseract's own pdf output kept the words, but on a page 27.4 inches wide.
Why is my OCR text empty on a sideways HEIC photo?
The photo is stored on its side, with a tag that says which way is up. sips keeps the tag and Tesseract ignores it: 5 of 564 words. magick in.heic out.png turns it upright (478), and so does Apple Vision.
Does converting HEIC to JPEG lose OCR accuracy?
Barely. On 10 scans, Tesseract found 1,877 words in order after sips made a JPEG, and 1,879 after magick made a PNG. On a sideways photo, use magick: sips keeps it turned.
Two ways to skip the work
Run it yourself. Our Apify Actor turns scanned PDFs and images into Markdown, tables included.
Or send us the JPG, PNG or PDF. Tack, our AI, does the job for $29, up to 50 pages. First page free.