anna.morris's blog


Archive for the ‘Uncategorized’ Category

Cutting out a photo and removing white edges in GIMP

Wednesday, June 5th, 2013

This Blog is taken from my Ethical Pets Wholesale blog for small businesses.

Here is the problem:

Screenshot from 2013-06-05 18:52:54

When you view this image on a white background it looks fine, but when you view it on a black background (or other dark colour) then there are little white bits around the image. It may be tempting to try and remove these with an eraser effect – but that will take a very long time and won’t look as good. Here is a simple way of removing them using a mask.*

This guide uses GIMP – the Gnu Image Manipulation Program. The GIMP is a Free Software photo and image (raster) editor and you can download it, gratis, here..

Screenshot from 2013-06-05 19:05:10 Right click on the layer in your layers dialogue and click “Layer to Image Size”

number 1 Once you have opened your image, make sure that your image is on a layer which fills the whole screen by right clicking on the layer in your Layers dialogue and clicking Layer to Image Size.

Next You need to duplicate the layer. To do this you right click on the layer again in your Layers dialogue and this time choose Duplicate.

Screenshot from 2013-06-05 19:10:39 Right click on your layer and select “Duplicate”.

 

2

Next turn the duplicate layer into a black and white version. To do this click on the layer, and in the GIMP menus go to Colours > Threshold. When the Threshold dialogue appears drag the arrow all the way to the left. You are aiming to have an image where the background it totally black (or transparent) and the area with your image in is totally white.

Screenshot from 2013-06-05 19:14:11

Other dialogues, such as the Brightness-Contrast option, also under Colours, may be helpful in this stage of the process.

3

Screenshot from 2013-06-05 19:25:25 Use the Select by Colour button to select the BLACK / TRANSPARENT area (not the white)

Select the black / transparent area of your new layer using the Select by Colour tool. Go to the Select menu and click Grow. Choose a small number of pixels, depending on how much white you have. I have chosen 4 pixels. Click OK.

Screenshot from 2013-06-05 19:25:34

If you zoom in (use the plus / add key) you will see that the selection is now a few pixels closer to the centre of your logo than it was before.Screenshot from 2013-06-05 19:26:41

Press your Delete key (depending on your current layers and transparency set up you may or may not see a noticeable change). Go to Select > None.

4Screenshot from 2013-06-05 19:39:52Right click on your layer in your Layers dialogue again and this time select Add Layer Mask. In the Add Layer Mask dialogue click Greyscale copy of layer. You will see your layer mask appear next to the layer in your Layers Dialogue.

Screenshot from 2013-06-05 19:46:56

Go to Edit > Select All (or try using Control+A) and the go to Edit > Cut (or use Control+X). Click on your logo layer then right click and Add Layer Mask. This time choose White (full opacity).

Screenshot from 2013-06-05 19:47:16_2

You will see a new Layer Mask next to your logo.

5Go toScreenshot from 2013-06-05 20:03:55 Edit > Paste (or Press Control + V). You will see the layer mask you made with your Duplicated layer appear in the layer mask for your original logo layer.

If you now look at your logo with a black background behind it (try Layer > New Layer if you need a dark layer) you will see that the white bits have been cut away (they are actually only hidden at this stage, if you right click on your logo Layer and click Disable Layer Mask you can see your logo is untouched).

Screenshot from 2013-06-05 20:05:19

If there are any white parts left, right click on your logo layer (not the duplicate) in your Layers dialogue and click Mask to Selection. Go to Select > Grow and chose a small number of pixels again. Press OK. Press your delete key. Notice that more of your logo has been hidden. Repeat this until all of the white parts are hidden. Save your file at this point especially (File > Save or Control+S)

6

Last of all, you need to apply your layer. It’s probably worth saving the document as something else first to allow you to make changes to your mask in the future if you need to. I saved mine as Logo_Perfect.xcf (xcf is the gimp format. I will export it as a .png or a .jpg later). When you have saved your file right click on your logo layer in your Layers dialogue and choose Apply Layer Mask. You will see the mask has gone and the white parts have now been properly cut away, and not just hidden.

Screenshot from 2013-06-05 20:24:17

You have done it! Well done! 🙂

*You could use this guide to cut out the whole image from scratch. This guide is is useful too (but out of date). Also, there may be other ways to do the task I have described, this is just the way I figured it out first 🙂

 

kdenlive image clips always wrong size – part two

Wednesday, June 5th, 2013

Hi, this post part two of a thread relating to a forum post on the kdenlive forums here where I am discussing the issue of image clips. Part one is here.

So I now see that if I import a video clip, choose the recommended profile suggested by kdenlive, and then add a image clip from the same camera then the problem desists:

there are the settings and here is the image showing perfectly

however, then photos from other cameras have the problem: here are ones from my phone, my nikon coolpix and my webcam:

Also, my pink clip which is 1080 x 1440 looks the same:

I accept that I may be a little slow on the uptake with understanding this, and that, as I am not from a video background, I don’t know much about the size that pictures are supposed to be – however,

a) I still think there must be a more attractive way for kdenlive to handle the issue and

b) There needs to be a clear manual somewhere relating to this issue for other people like me (of which there are many!). I am happy to write it if i have help!

 

kdenlive image clips always wrong size

Wednesday, June 5th, 2013

Hi, this post is relating to a forum post on the kdenlive forums here where I am discussing the issue of image clips. I have prepared an example to illuminate:

If I make an image in gimp the same size as my video dimensions:

And then import the image as a clip into Kdenlive (using the add clip menu or button) then the clip looks fine in the project tree, but in the project and clip monitor, you can see two black bars down the side.

If I, say, add a clip with a circular black on it, the circle you can see that the aspect ratio of my image seems to be maintained while the size seems to be incorrect.

If I force the aspect ratio using the clip properties menu this is the result:

If I make the a larger image clip:

then the clip looks the same at first in kdenlive, but notice that on the left, in the project tree, the spot is smaller (when in gimp it is the same size)

Here is a video clip which VLC reports as being the same size as my image clip and my project:

It  looks totally different, indeed almost the correct size, in my clip/project monitor:

So video is either different to start off with or is treated differently by kdenlive.

Anyway.

If I make my clip wider I seem to make some progress:

The extra width seemed to help – but the hight now seems to be lacking where it was fine before. An aspect ratio issue? I wonder if it is to do with square and non-square pixels?

I am sure, after much messing around I could find a size of image that seems to display correctly in kdenlive (indeed that’s one of the things I have tried in the past) though I am sure all of this will involved a lot of work with actual photos and be a real pain in the backside to achieve. Primarily, I don’t understand WHY this is such a big problem in the first place. It really shouldn’t be!

It FEELS like there is an ugly default setting involved here – for example the second image I made that was larger but still took up the same space and had the same area missing on the monitor in kdenlive, I assume because it had the same aspect ratio. Surely there could have been more sensible for kdenlive to handle the problem? Maybe it could automatically “crop” a little of the top and bottom rather than shrink the image to fit in the space. That is how, for example, digital printing booths deal with the issue of wrong aspect ratio (given that the top and bottom of a photo are usually ripe from cropping anyway).

The only way I have found to achieve this within kdenlive is to zoom in on the photo – but that results in pixelation, so it looks like kdnlive is actually shrinking the image on import as otherwise the zoom should not cause quality loss until it surpassed the size of the original image? Or maybe I am totally wrong. No clue! Will keep this post updated with whatever occurs on the forum.

A photo montage is one of the first things a newbie might try and make, and yet its not exactly simple to get images right.

Formatted a drive but “you are not the owner, you cannot…”

Friday, May 17th, 2013
I bought a new hard drive, 3tb, to use inside my pc for data only (not an OS) – a bit like a massive thumb-drive. I put it in my machine, and, as it was a 3tb drive, made a gpt (GUID) partition and formatted it in exp4. This all went fine, however, when I tried to put data on the drive, I couldn’t. I kept getting errors about the drive being owned by root.
I looked around on-line and found several people with the same trouble, but none of their solutions worked., either at all, or some step involved did not work in fedora/in my case (most of the guides were on Ubuntu sites). Eventually I went onto the fedora IRC. Below is the solution i got (WARNING – DO NOT DO THIS ON A DISK WITH AN OPERATING SYSTEM ON IT – BE SURE!!)
1) Make sure your drive is mounted. If you click on your files you should be able to see inside the drive and you should see a little eject symbol too.
2) open a command line and write
sudo chown -R
don’t hit return yet, you need to put some info in now. The info pattern is like this
youruser:youruser (or yourgroup, if your primary group has a different name; ‘id’ will show this) /path/to/mounted/filesystem
Its the same information you can see in the black box on  the image above, but you can copy and paste it from here:
Select the part that says “location” – in my case it is /run/media/missannafjmorris and copy it (control+c or right click copy)
Go back to your command line and press control+shift+v (or right click and select paste) and then type forward slash. Don’t hit return yet.
Go back to the window about and select and copy the info after name, in my case a long number string. Paste it into your command line. The while thing should look like this:

Once you have written the command and checked to make sure it is correct, you can hit enter. The problem should now be solved!Your terminal will just look like its ready for the next command., but you will be able to use your disk as you wish becuase it now belongs you you – and not root 🙂

Setting up GPG keys on second machine: importing your existning key

Monday, May 13th, 2013

I had a little trouble today while trying to set up my GPG encryption on a second computer, using Wnigmail. The key importing process is rather unintuitive. Once you install Enigmail on your second machine, the natural thing to do is run the Set-up Wizard, which appears to give you the option to import your public and private keys. Once I had found out how to export my keys from my current set-up, I discovered that they get exported as one file, not two, but the set-up wizard wants you to import using separate files, one for your public and one for your private key. After a while I found needed to import them using a separate process. Here is what I did:

To export current GPG pair: In your email client go to Open-GPG > Key Management. I found my key by clicking the “display all keys” box on the window, but un-clicking “Display keys from other people” in the View menu.  Selected your key by clicking on it, so it is highlighted in blue, and go File > Export keys to File. Click the option to  “include your private key” and save the file to a memory stick or external drive (don’t email it to yourself!)

To Import current GPG pair on a second machine: Go to that same dialogue on your new machine, under Open-GPG > Key Management. Go to File > Import keys from file. Chose your file and import them. You should now be set up. You can check by trying to read an encrypted mail – if you don’t have one, send one to yourself from your other machine.

All done!

However, I think the set up wizard needs some work!!

Anna

xxxx

 

Experiment: There may be confidential content in your search results. Please do not share outside Google. – Missing Q and A’s?

Saturday, May 11th, 2013

as a follow up to the recent “Experiment: There may be confidential content in your search results. Please do not share outside Google.” incident which I blogged about here, I searched for more info using Google. Found a few odd little things…

Some* questions about it on Yahoo have been removed.

I wonder which part of their Community Guidelines forbid discussing GoogleBugs?

Perhaps stranger still, looks like some user replies have been deleted and some redirects have been made too.

 

A little later in this thread, some one named  epontius said that other threads had been redirected to this single thread because “This one is being monitored by staff… so the other threads concerning this issue have been redirected to this one to keep things in one place.”

Given that Google recently proclaimed search results should be impartial (and so should not (necessarily) be included in the “right to be forgotten” protection), I really trust that they wouldn’t mess about with links and users questions for something so trivial as a technical hiccup….

jus’sayin…

* (one or more, hard to tell: several links in search results but all leading one URL)

Experiment: There may be confidential content in your search results. Please do not share outside Google.

Thursday, May 9th, 2013

What are Google up to?

Was looking for database tutorials on YouTube when this appeared:

I Googled the text and found it was practically vial, people asking about it with posts every few mins:

What are they up too? Could this relate to privacy issues? Are they toying with us? Do we disobey and share all of the things we find “outside of Google”

What does “outside of Google mean?” – on another search Engine? Off-line?

Twitter seems to be intrested in discussing the issue…

//

 

How to mass find and replace in wordpress – great for dyslexics!

Tuesday, May 7th, 2013

I manages to miss spell a place name about 300 times today (not exaggerating) on my wordpres blog. I managed to find and replace all the mistakes in the post using a Firefox add-on but then I realized the mistake was also in all my photo captions. Mass photo management is a nightmare in WordPress anyway, I was pretty strung out, however, this add on was a real lifesaver. It took me a while to workout that it was case sensitive (yes I know it says it in the instructions, but I was half asleep and really stressed) so all in all, a good job! Would have taken several hours manually and it only took about 30 seconds once I had found and figured out the app!

I lost my libreoffice file, help!

Tuesday, May 7th, 2013

This is really useful info http://ask.libreoffice.org/en/question/6652/how-to-recover-former-version-of-document/ – it didn’t solve my problem today, however, I will certainly be glad of this information in the future!

Installing Flash on Fedora 18

Tuesday, May 7th, 2013

Just to say I thought this guide was great, worked straight away.