Friday, February 26, 2010

Resizing photos for ebay listings - a simple 'right click' in Ubuntu

Should you need to be a photo editing expert to do a simple resize? I think not. A simple 'right click' will do in Ubuntu and I will show you how.

I write this article in a Tutorial style and begin with a slightly historical* task - that of getting an image in the correct (traditional) size for ebay listings (400x300 pixels)

[ *Ebay now have their own 'site help' methods for image resizing but regardless the ability to resize images is a generally helpful thing for users to know (family photos, simple websites, etc) ]

Here is what to use:

Now this context menu is a screenshot of the default Ubuntu Gnome file manager (Nautilus), but with an extra install, that makes 'Resize Images' appear when right clicking image files.

If you want to run ahead and do the install then skip towards the end of this post otherwise read at your leisure and do the install last.

A typical 12 megapixel camera will throw out a 4000x3000 pixel image, which is too large for uploading to ebay, and too big for website illustrations also.
This kind of quality is great for when you take your family snaps to the photo processing place - you get real good quality prints! Not so great for ebay and website work.

My aim is to reduce this picture (original size 800x600 pixels):



...to a more ebay friendly 400x300 size.

What you do not need is a fancy bells and whistle graphic editor (GIMP, Photoshop, whatever), which unless you are already skilled in them, might be considered a sledgehammer to crack a nut.

Here goes ...



...then...

...so I am asking for 50% of the original image size to be placed in a new file which has the helpful suffix 'resized' :)

...and clicking the 'File Properties' then 'Image' tab tells us all about the new image:


and we are done.


Installing the Nautilus extension 'nautilus-image-converter':

From the 'Ubuntu Software Centre' (or 'Synaptic') you search for 'converter' and locate the package named nautilus-image-converter. Install it.

or if you are reading this in Firefox then you might have some luck by clicking the following link:
apt://nautilus-image-converter
( command line folks will probably just go for apt-get install nautilus-image-converter )

Now that your install has completed, you should see, when you are using Nautilus, that 'right click' on an image has the extra menu entries 'Resize Images' and 'Rotate Images' (not applicable for non-image files as you would rightly expect)

By using this 'Resize Image' option you can also help lower the filesizes of your images, making it possible to stay below ebay limit of 4MB per image.

( 'high end' cameras will often produce photos that exceed this 4MB limit which ebay has imposed )

*** end of main article ***

Footnotes:
For those who might be wondering about the silver item in the picture - it is a catering bain-marie and in some cafes you might find it used to warm your baked beans and peas :)

I am a capable user of GIMP. I like it a lot, and use it a couple of times a week in my work. This article is not intended to suggest GIMP will not do the job for you. It is my tool of choice generally, but I think there is value, also, in providing a tutorial that shows an alternative that 'right click' fans can use to get the job done.

When I read on the Internet questions like 'where is Linux equivalent of Microsoft Paint', and I scratch the surface, it turns out that what the user is really trying to do is a simple 'resize' or 'rotate' operation. This article provides the solution.

Personally I urge Linux users who are likely to regularly do a bit of image editing to learn GIMP - it really is very capable, and the hours you put into learning it will be repaid. If you really take a dislike to GIMP (for whatever reason) then here is a list of programs that you might look to as a (less preferred by my reckoning) alternative:
  • Gwenview
  • Gthumb
  • KolourPaint
( Eye of Gnome is a viewer rather than an editor so see Gthumb perhaps )


If you want something that manages your photos (personally I feel no inclination myself) then you would look to programs such as:
  • F-spot
  • Digikam
  • Picasa

Wednesday, February 24, 2010

ppa package users and NO_PUBKEY - Dell laptops in particular

If you are seeing messages like:
'The following signatures couldn't be verified because the public key is not available'
when you attempt to update your Ubuntu machine then read on for what to do.

In particular Dell laptop users who have manually upgraded their distribution will likely keep seeing this message until they issue apt-key add

There is no mystery in all this and the message 'GPG error: http://ppa.launchpad.net' gives you a fair clue as to what is wrong I think.

In short you are consulting a ppa package repository aswell as the regular Ubuntu repositories. Message example here:


Steps to solve (illustrated in next few paragraphs):
  1. Get the missing key from a keyserver
  2. Add it to your local key store
Before attempting to get the key from the keyserver you might need to disable any firewall you run. Keyserver ports are quite rarely used, so it is possible your request will be blocked if you have a firewall active.


( The above is a fair illustration of a machine with no firewall running )
Command to check your machine: sudo /sbin/iptables -n -L

Now you can get the key from the keyserver:


( Click on the above image if it blurs on your screen or simply paste following command )

gpg --keyserver keyserver.ubuntu.com --recv 8B9FBE5158B3AFA9

Now to add it to your local keystore you will need an apt-key add perhaps like the following:

...which I repeat in convenient form here:

gpg --export --armor 8B9FBE5158B3AFA9 | sudo apt-key add -


If you get back an 'OK' message then your key was added to the local keystore and your next attempt to update will not see NO_PUBKEY messages :)

Note: All command examples in this post assume the ppa key you are missing is 8B9FBE5158B3AFA9. If your key is different, then just replace the key id I am using (which ends in AFA9) with the key id you are seeking and go that way.

*** End of main article ***

Footnotes: If at any point you witnessed a message that said 'unsafe ownership on configuration file...' then I write a short explanation in the next few sentences.

The gpg export command needs to be executed with your own privileges as by default only your userid can see the contents of ~/.gnupg/gpg.conf

running sudo gpg --export rather than the correct gpg --export command will trip you up.

Sometimes messages like 'WARNING: unsafe ownership' will make you wonder about your security setup but satisfy yourself that your ~/.gnupg/gpg.conf file really is only readable and writeable by your own user account with a simple ls command:

ls -l ~/.gnupg/gpg.conf

...which should show permissions like -rw------- if all is in order

Comment: My Dell Laptop (Inspiron 1525) came preinstalled with Ubuntu 7.10 (Gutsy) and had the relevant ppa keys from Day 1. When I manually upgraded to newer distributions, I choose to leave my preinstalled system behind, and this required me to add appropriate ppa keys .

Sunday, February 7, 2010

Who is more 'free and open source' - Nokia or Google? (part 1 of many)

This is intended as the first in a series of posts that might help answer the question in the title above.

I do not give a single conclusion and I also recognise that Nokia and Google (as with most companies) will have some fans and some detractors also.

Which of Symbian or Google Chromium OS has the better license?

The answer here will be very subjective, so perhaps I might just direct you to some relevant resources and let you decide.

Nokia 'Symbian' license (EPL) is recognised by the Free Software Foundation

Google 'Chromium OS' license ( BSD*) is recognised by the Free Software Foundation

*The license is, I think, referred to as 'BSD 3 clause' or 'BSD New Version' in the description here.

Where things get a bit interesting is in what constitutes the core OS and what are treated as 'addins' or 'Included Software and Licenses'

Symbian under EPL is so new I have no resources to consult regarding 'addins', but for Google Chromium OS this list seems to explain things clearly.

Advocates of Free and Open Source Software would ideally, I think, have both of these projects licensed under GPL instead, and there will, I am sure, be a healthy debate about how each of the chosen licenses is imperfect.

Note: By saying 'recognised by the Free Software Foundation' in the previous paragraphs I hope not to have given the impression that either the EPL or BSD licenses are superior or some 'gold standard'. In some aspects EPL and BSD come out less favourably than the GPL, which would allow better cross fertilisation with the huge package code base, already established within GNU/Linux and GNU/kFreeBSD.

(I have not covered Maemo at all in the discussion above so as not to make the comparison a 3 way. Perhaps some readers might think that Maemo vs 'Chromium OS' would be a more important comparison to make....a valid point....more later...)

Hummus and Thai in North London

Whilst in London for a couple of days, I thought I would try avoiding the meaty fast food choices, and see what sort of healthier lunches, were available at pocket money prices.

The two places which gave me a tasty lunch at £3 or less were:
  • Hummus - sized nicely for lunchtime takeway and very well presented.
  • "Veg" on Euston Road - Thai cooking (non-meat) - fill your own takeaway tray
Being out and about exploring, and the weather being good, I choose takeaway, although both places provided seated areas for people looking to stay and eat.

If you are nowhere near those places, then a Friday lunch at Subway was also a good option for me ("Sub of the day" is Tuna)

Or perhaps you might be a bit more planned about things and take a look at one of the extensive "Vegetarian London" guides which contain over a hundred places to eat out in London.

When not munching fine takeaway fare, I managed to navigate on foot from Southwark to Marylebone and from Euston to SW7 (V&A Museum)

On the beer front I quite liked these real ales:

I enjoyed a walk across the Millenium Bridge after taking in some sculptures and modern arrangements at Tate Modern

A trip out to North Greenwhich to see what the O2 dome is about, and an unplanned but surprisingly full visit to The British Museum rounded out my trip.