Converting HEIC files to JPG or PNG on Ubuntu 18.04

HEIF stands for High Efficiency Image Format (file extension HEIC i.e. filename.HEIC). It is a new (ish) image file type.The HEIF image format builds images with a smaller file size and better image quality than the older jpeg standard. That’s why Apple has moved over to it as its default image standard on their new phones. Evidently Android will soon too. So how do you go about converting HEIC files into JPG? On Ubuntu 18.04 there’s a handy little package called heif-examples you just have to install it. As so:

sudo apt-get update
sudo apt-get install libheif-examples

Now to convert a file to (say) jpg on the command line its:

heif-convert filename.HEIC filename.jpg

That appears to convert the file to a jpg with 100% quality. With me I ended up with a jpg that was about 30-35% larger than the HEIC file. You can though reduce the size of the jpg by reducing the quality of the conversion. Like so:

heif-convert -q 75 filename.HEIC filename.jpg

The -q value can go from 100 (default) to whatever you can get away with. For me (and family snaps) 75 always seems a good compromise. Again with a short simple test my 75% quality jpg output file was smaller than the original HEIC file by about 20%.

Factfulness by Hans Rosling
Things ARE better than you think. Don’t believe the doomsters. Here is why they are wrong!
8500 5* reviews

I also tried the conversion to png files but I found that the resulting png file inflated the file size by 700%. I hasten to add though the image being used was not really suitable for png. But even so the image came out 5% bigger than just by using Gimp to convert the 100% jpg to png at level 9 compression. I also found I couldn’t change the compression on the png. Adding -q 75 or -q 9 (or whatever) did not affect the final png file size. This is probably my fault. If you know how to do this please enlighten me.

You can also go the other way and convert jpgs to HEIC files. But this needs a different tool from the same repository and in it’s simplest form you use it like this:

heif-enc filename.jpg

This will generate a HEIC file of the same name in the same directory

There are more options with this command than with heif-convert the full list is here. The main ones (imho) are:

  • -q Defines the quality of the output heif image. Like hief-convert this goes from 0 – 100
  • -L This makes the output HEIC file lossless and overrides -q (if it exists)
  • –no-alpha This (I think) removes the background making the image transparent.
  • -o Defines the output file name.

Interestingly, when I tested this command I found I got better compression when I specified the output filename.
i.e.:

heif-enc filename.jpg -o otherfilename.HEIC

Than when I just let it default. I don’t know why.

So there’s how to go about converting HEIC files into JPG files (and PNG’s too – with reservations)

Anyway here’s some serious respect to the guy(s) who wrote this converter.
You can find more about them here. The repository for this code with further information (especially on heif-enc) is on this Github Link.

My other Linux/Ubuntu Howto’s and Gotcha’s are on this link.

HP Compaq DC5800 Kernel Panic on Ubuntu: Fix

Some years back I inherited an old HP Compaq DC5800 Micro-tower. I happily ran Ubuntu 16.04 LTS on it for a long time. Then one one day I did the ritual updates (which included the kernel) and on rebooting, the DC5800 did a Kernel Panic and halted. I booted using the previous kernel and all was fine. The machine never managed to update the kernel again. If I tried, it suffered a Kernel Panic on reboot. I have (yesterday) found the solution to the problem. Below is a guide with pictures.

Continue reading

Need a PDF document word count? Here’s a simple approximation.

PDF documents are great but there may come a time when you are reading/reviewing one when you need to roughly know what the word count of the document is. By their nature PDF’s are usually full of charts, images and tables that make the task difficult. Most (all?) free PDF viewers don’t give the reader a word count in situ. So you have to use either expensive software or another method.

Continue reading

Bypassing Amazon but still published on Kindle? Simple! Here’s How.

Lets say you run a email newsletter. Maybe you would like to provide your readers with something a little less email-like and get your newsletter content/links/downloads published on Kindle. For arguments sake let’s say you want to send your readership a free e-book to read on their Kindle once in a while. It could be fiction or fact. The subject matter is immaterial.

Continue reading

Publishing using Amazon KDP. When Less is More.

Many indies use Amazon KDP. It is a great way to publish a book of any size.  We often associate more pages with more value and bigger royalties but that is not always the case. There are circumstances when publishing paperbacks on Amazon KDP where you can increase royalties by decreasing page count. A case when less is more!

Continue reading

A Story-line for Writers

Before I come to this “Story-line” for writers, I want to purposefully digress slightly and talk about an excellent TV series on Netflix called “Black Mirror”. It is relevant (honest!).

Black Mirror is a series without a unifying story. It is in effect a set of stand alone stories. Each story is different and could be put out as-is without any of the others. Each story stands alone on its own merits.

Continue reading

Libraries and Public Lending Rights

If you place your book (or your book is placed) into one or more public libraries in the UK then you can register for an annual payment under the Public Lending Rights scheme (known as the PLR – see here).

Public Lending Rights is a long standing UK government scheme. It recompenses authors for loans of their work from public libraries. While the income from Public Lending Rights will not set the world on fire, it is a rather satisfying confirmation that your work is getting noticed and read. I believe most other countries run very similar schemes.

Continue reading

The Tyranny of Amazon Ratings

Authors all crave Amazon ratings. A string of good ratings really can establish a book. This is especially true for ebooks. An ebook with an initial bad rating will die a sudden death. If the first rating is bad then it can kill free downloads. Let alone sales.

Most readers do not give a rating. Even those who really enjoy or significantly dislike the work usually just let it pass. Most of those who do give a rating do so because the book has had an impact upon them. They try to fairly judge the work on what they got for their money. Which is fair enough and what we all want.

Continue reading

Buying an ISBN in the UK

There are many head winds facing a self publisher. One of these is the cost of buying an ISBN in the UK. The price structure for buying ISBN’s strongly favours big companies while severely penalizing small publishers.

If you are publishing a single book and so just want one ISBN, you will get hit the hardest of all.

This is the price structure for buying ISBN’s in the UK as of today.

Continue reading

Niche Non-Fiction: Ebook or Paperback?

Nobody is going to get rich writing niche non-fiction books on local history or other similar narrow niche topics. But if you can get a some sales it will give you a great feeling. You will have provided a useful resource to the community.

If you are lucky, writing a niche non-fiction book might allow you to buy a few beers. But you most certainly should not give up the day job!  So if you want to maximise the number of beers what should you publish? An ebook? A paperback? Or both?

Continue reading

Zombie Novellas

NOTE: This is about novellas, short stories and other ebooks that do not sell.  It is not about the Zombie novellas as a genre!

OK, lets say your novella or short story sold a few copies then went into rapid decline like This One did. Now, two years on, instead of giving you that small but consistent income you were hoping for, it has dropped to a sales rank so high it resembles the number of dollars you were dreaming of making when you started writing.

What should  you do?

Continue reading

Sales Analysis: A Poor Selling Short Story

In the last post I displayed the statistics for the first of three short stories I wrote a  few years ago. The sales performance of this first ebook was hardly spectacular. But it took less than a day to write, format and then submit. It was also just an experiment. So taking all into account, it wasn’t bad. I made a couple of hundred quid. In this post I want take a real no-hoper and do some sales analysis.

Continue reading

Lifespan of a Short Story eBook.

In my last post (Here) I looked at how the ebook Novella and short story market appears to be overcrowded. I went on to surmise though that maybe it is not as bad as it first looks. Could it be that as most novellas and short stories seem to have a very brief shelf life? Which would mean the author of a new novella would be competing mostly with corpses.

If that is the case then there is some good news.

The good news is that the market is not swamped. Or at least, less swamped than we thought. Sadly though there is some bad news too.

Continue reading

Novella Sales are NOT Dead!

(It is just old novellas smell funny)

So how do novella sales compare with other ebook formats? Look at this graph I picked up from Data Guy on AuthorsEarnings.com. Like all of the Data Guys information, it is immaculate. Everything on his site is worth a read. (Frankly I’m in awe). There is no reason to doubt the graph below at all. But, I do not think it tells the whole story.

Continue reading

eBook Sales USA versus UK

Just to wrap up the last set of a short series of blog posts on how many ebook sales you can expect from a specified sales rank, I thought I would just compare the pluses and minuses of  sales rank performance in the USA and UK. The series started On This Link

We know that by far the biggest market for ebooks is the USA. Below is the relative quantity of ebook sales by Amazon in 2017 by English speaking region. Bear in mind Germany is a bigger market than the UK.  Japan is nearly as big. There will be more on these two markets in a later post.

Continue reading

Ebook Sales Rank (UK) The Long Tail

In the last post I looked at the relationship between ebook sales rank and actual sales for popular ebooks in the UK.  This post is about those ebooks that sell less well and how the sales rank relates to actual sales for them.

Over 400 million ebooks were shifted by Amazon USA in in 2016/17 whereas the UK managed just short of 85 million. So the ratio of ebook sales between the two behemoths is of the order of 5:1. Unsurprisingly the sales rank for the same ebook differs greatly between the two.

So, are the USA sales ranks totally independent of the UK store? I think so. Inevitably there will be books that sell well in the USA and badly in the UK and vice sa versa. So to have the same ranking for both would be self defeating.

Continue reading

Ebook Sales Rank for UK

The last couple of posts, starting with (This one) I have explored how ebook sales rank relates to number of ebooks sold. But that was for the USA. From the data that is out there I extrapolated to end up with a set of graphs showing how Amazon sales rank related to actual sales. Obviously this comes down to my interpretation but I think it stands up. Here I will try an explore the same issue with UK sales rank.

Continue reading

EBooks: The Long Tail Sales Rank in USA

In the last post (Here) I tried to graphically present how many ebook sales per month you could roughly expect for a particular sales ranking. This was fine for those shifting 1000’s a month. For those with a sales rank under 10,000 it was useless. The resolution on the graph was simply not up to displaying the highs as well as the lows. The long tail ebook sales rank in the USA just blurred into the x-axis.

Continue reading

eBook Sales Rank in the USA

This is the first is a series of posts on how ebook sales rank in the USA and the UK relates to the number and rate of ebook sales. While there are a number of  tools available that will give an approximate sales outcome for a particular rank, they are a little like fruit machines. You put in your sales rank. Pull the handle. Out pops an estimate of the number of books you need to sell to achieve that sales ranking.

I thought it would be nice to present this data graphically so we can all see what is going on right across the full sales rank spectrum. I intend going down to where a ebook is selling only a handful of copies a year. This is below the resolution of the fruit machines.

Continue reading