Many image file formats exist, but which ones are better for what task? Here is a quick overview in my little series of PhD advice blog posts (the previous being tips on dissertation writing and the public PhD defense).
Two different image types When choosing a file format for your image, the first thing is to figure out whether you are dealing with a raster image (photos) or a vector image (line illustrations).
I am doing some end of the year cleaning on my hard drive and just uploaded the Jupyter Notebook I used in the analysis of a mobile phone lying still earlier this year.
For some future studies, I thought it would be interesting to explore the PDF export functionality from Jupyter. That worked very well except for that I didn’t get any title or author name on top:
Then I found a solution on Stack Overflow.
As mentioned yesterday, the source files for the illustrations in my Sound Actions book are available on GitHub in the form of LibreOffice Draw files (ODG).
Draw may be less powerful but much easier to work with than more advanced line art software, such as Inkscape. One of the nice things about the LibreOffice package is its scripting possibilities. While working on my book, I wrote a shell script that would read all the ODG files in a folder and convert them to PDF and PNG files:
I have previously written about how to export each of the pages of a PDF file as an image. That works well for, for example, presentation slides that should go on a web page. But sometimes there is a need to export only the images within a page. This can be achieved with a small command line tool called pdfimages.
One way of using it is:
pdfimages -p -png file.pdf image This will export all images in file.
This blog post summarizes my experimentation with improving the quality of the PDF files in the proceedings of the annual International Conference on New Interfaces for Musical Expression (NIME).
Centralized archive We have, over the last few years, worked hard on getting the NIME adequately archived. Previously, the files were scattered on each year’s conference web site. The first step was to create a central archive on nime.org. The list there is automagically generated from a collection of publicly available BibTeX files that serve as the master document of the proceedings archive.
I have previously written about a shell script) for compressing PDF files in Ubuntu. Here are some variants of the script.
Low, mid, and high resolution Low resolution for screen:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf I prefer the “ebook” mode, which has slightly higher resolution:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf And then there is the high resolution for printing:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.
How do you create full-screen images from each of the slides of a Google Docs presentation without too much manual work? For the previous blog post on my Munin keynote, I wanted to include some pictures from my 90-slide presentation. There is probably a point and click solution to this problem, but it is even more fun to use some command line tools to help out. These commands have been tested on Ubuntu 19.
One of the fun parts of reinstalling an OS (yes, I think it is fun!), is to discover new software and new ways of doing things. As such, it works as a “digital shower”, getting rid of unnecessary stuff that has piled up.
Trying to also get rid of some physical mess, I am scanning some piles of paper documents. This leaves me with some large multi-page PDFs that I would like to split up easily.
Back on OSX one of my favourite small programs was called PDFCompress, which compressed a large PDF file into something more manageable. There are many ways of doing this on Ubuntu as well, but nothing really as smooth as I used to on OX.
Finally I took the time to figure out how I could make a small shell script based on ghostscript. The whole script looks like this:
#!/bin/sh gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.
I am working on finalizing an electronic version of a large PDF file (600 page NIME proceedings), and have had some problems optimizing the PDF file. This may not be so strange, since the file is an assembly of 130 individual PDF files all made by different people and using all sorts of programs and OS.
Usually, PDFCompress works wonders when it comes to reducing PDF file sizes, but for the proceedings-file it choked at some of the fonts.
I just installed Adobe Reader on my new computer, only to discover that it hijacked the PDF preview window in TextMate when working on LaTeX documents. This also happened the last time I installed a new system, and I couldn’t remember what I did to change it back to using Preview as the default PDF viewer.
After googling around, I remembered that TextMate is just using the regular browser settings when it comes to displaying PDF files.
After I began using PDFCompress for minimizing PDF files, the only reason I have had for using the full Adobe Acrobat has been to combine PDFs. Now I realize that since OS 10.5 this functionality has been built into Preview. I guess I should really start reading the release notes of OSes and applications a bit more carefully, since I managed to get to 10.6 before I found out about this feature.
I have been trying to create a booklet out of a standing A4 paper (the booklet size should be 105 x 297 mm), but this has proven to be much more difficult than I would have originally thought. It is a while since I have been doing things like this, and I still remember how easy it was to do such things back in the days when I used to use MS Publisher 1.