How-to: Images

Remove background nix shell nixpkgs#rembg --command rembg i -m bria-rmbg input.jpg output.jpg Removes background using bria-rmbg, a state-of-the-art background removal model by BRIA AI. It yielded the best results for me, but try out the other models as well!

January 10, 2026 · 1 min · Abdelrahman Abdelhafez

How-to: PDFs

OCR nix shell nixpkgs#ocrmypdf --command ocrmypdf --language deu --force-ocr input.pdf output.pdf OCRs the German text in the scanned document and overlays the OCRed text onto it. Deskew nix shell nixpkgs#ocrmypdf --command ocrmypdf --deskew input.pdf output.pdf Deskews crooked pages. Fake duplex nix shell nixpkgs#pdfcpu --command pdfcpu merge -mode zip output.pdf front.pdf back.pdf Produces a 2-sided document by interleaving the given odd- and even-numbered pages (scanned by a non-duplex scanner). Extract images nix shell nixpkgs#poppler_utils --command pdfimages -j -png input.pdf sample Extracts the JPEGs from the given document as PNGs. ...

September 14, 2025 · 1 min · Abdelrahman Abdelhafez