Showing posts with label graphics. Show all posts
Showing posts with label graphics. Show all posts

Thursday, October 6, 2016

Learning to code for kids

Here are 5 websites to start the young minds with coding. In no particular order;

Scratch 

Use of the famous programming blocks of different shape and colours to do coding. Adobe Flash is required for the web interface.

CodinGame

Use web interface to complete snippet of codes. This is not for the uninitiated. You have a choice of using the text editor Emacs, Vim or the standard IDE that supports several popular programming languages. This includes C, C++, Java, Go, Paskal, PHP, Python and Ruby. If you are looking to learn logics and algorithms, this is it.




Code Academy

Provides programming courses for free. Personal learning plan and quizzes with advisor are included in the paid subscription. Its starts off with learn to HTML and CSS.


Code.org

Place to learn coding with contribution from many difference sources. Some element of Scratch with specialised themes and gamification to learn coding. Lots of resources for lesson plans.
A sweet start would be Coding with Anna and Elsa.


Alice

Create 3D animations and learn programming for those familiar with the use of computers. This product of Carnegie Mellon University teaches C++, Java and C#.



Any of these made it to your your favourite sites?

Friday, May 20, 2016

Howto convert photos to line drawing with GIMP

GIMP provides a large tool set to edit photos. This software is provided with GNU License and is available to use on Linux and MS Windows computers.

Artistic look from photos can be created with a few steps in GIMP 2.8.8.

Start GIMP and open the photo (which is in colour).

Step 1: Select the photo.
From the main menubar, click Select ->All or press "Ctrl+A"

Moving dots/dashes should be around the photo.

Step 2: Remove colour from the photo.

Click the menu Colors ->Desaturate... and choose a shade of gray based on Lightness or Luminosity or Average. Click "OK"

Alternative method:
Click the menu Colors ->Hue-Saturation... and slide Saturation value all the way to left or -100.

Step 3: Strip gray tones

Click the menu Filters ->Edge-Detect ->Difference of Gaussians...
Default checks the boxes Normalize and Invert. Radius 1 value is 3.0 and Radius 2 is 1.0.

Note: At this point if it results in a blank image, remove the Alpha channel

Step 4: Raise the lines

Click the menu Colors ->Brightness-Contrast...

Increase brightness value and reduce contrast value until image appears. Click "OK"

Step 5: Enhance the light lines

Click the menu Colors ->Levels... and click "Auto".
In the graph like "Input Levels", slide the triangle till to left until the desired tone. Click "OK"

Done.


Tuesday, March 8, 2016

Install GIMP on Centos 6

Centos 6.6 provides the popular graphic editing software GIMP at version 2.6.9. The current stable release is GIMP 2.8 for those who seek the additional editing features (link). Existing Centos 6.6 does not have the required newer libraries to support GIMP 2.8.

The details of GIMP is described as below.

Name        : gimp                         Relocations: (not relocatable)
Version     : 2.6.9                             Vendor: CentOS
Release     : 8.el6_6                       Build Date: Thu 20 Nov 2014 02:06:25 PM EST
Install Date: Tue 08 Mar 2016 03:09:46 PM EST      Build Host: c6b9.bsys.dev.centos.org
Group       : Applications/Multimedia       Source RPM: gimp-2.6.9-8.el6_6.src.rpm
Size        : 48118103                         License: GPLv2+
Signature   : RSA/SHA1, Thu 20 Nov 2014 04:10:42 PM EST, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem
URL         : http://www.gimp.org/
Summary     : GNU Image Manipulation Program
Description :
GIMP (GNU Image Manipulation Program) is a powerful image composition and
editing program, which can be extremely useful for creating logos and other
graphics for webpages. GIMP has many of the tools and filters you would expect
to find in similar commercial offerings, and some interesting extras as well.
GIMP provides a large image manipulation toolbox, including channel operations
and layers, effects, sub-pixel imaging and anti-aliasing, and conversions, all
with multi-level undo.


Flexibility on editing include availability of many brushes and patterns.




 Here are steps to install the standard GIMP version 2.6.9
 

Step 1: Install GIMP



# yum install gimp





Step 2: Install additional brushes and patterns

Install additional brushes and patterns. Brushes include swirls and text to enhance strokes. Patterns such as clouds and funnymess.

yum install gimp-data-extras

Start GIMP from the desktop menu. Click Applications ->Graphics ->GNU Image Manipulation Program




Done

Friday, January 15, 2016

Raspberry Pi 2 and a VGA monitor

The Raspberry Pi 2 (RPI2) model B (more details) comes with many input/output connectors and of which its display output is using HDMI type A. This HDMI is also known as Full HDMI.

Model B is the big brother of Model A+ that is much more cheaper for specific implementation in an embedded project where the most minimal use of electrical power is needed.

The RPI2 can be hooked up to a decent monitor or projector using VGA connectors. All that is needed is a HDMI to VGA adapter. This adapter may comes with additional functions like audio output, additional power source or USB. Price differences are huge but here is an example that I got from online and it works just fine with the NEC AccuSync LCD52v monitor.

HDMI to VGA cable plugged to RPI2 and female VGA.


Done.


Thursday, September 17, 2015

Howto Screenshot Desktop

The print screen key or "PrtSc" can be used to create a screenshot of the desktop and windows. This will activate gnome-screenshot from the gnome-utils package.

Gnome-utils contain;

  • dictionary
  • disk usage analyser
  • screenshot tool
  • search 


By default on a server setup of Centos Linux 6, the screenshot is not installed. This can be done easily.

Step 1: Install gnome-screenshot

As a admin role (root) at the terminal, type
# yum install gnome-utils

Step 2: Take screenshot of desktop or active windows

Screenshot of desktop
Press the print screen key or "PrtSc"



Screenshot of active window
Hold "Alt" key and press the print screen key or "PrtSc"

Edit the graphics name and press Save.

Delayed screenshot
This is useful if the screenshot can only be taken without user intervention.

  1. On desktop menu click Applications-> Accessories-> Take Screenshot
  2. Choose which area of desktop to take screenshot and enter the number of seconds for "Grab after a delay of ___ seconds.
  3. Click "Take Screenshot"



Done.





Paint program on Centos

Linux comes with open source software (OSS) for graphics editing, such as XPaint, GIMP and Tuxpaint. Vector editing can be done with Inkscape and xfig.

XPaint is a light weight program to do simple graphics editing and carries the GPL license.

Currently maintained by Jean-Pierre Demailly, but as stated in the "About" message, not to send bug reports.

Installation of XPaint (currently version 2.9.9.4) on Centos Linux 6.2 64 bits is quite straight forward.

Dependencies;

  • Xawd3d 1.5
  • gv 3.7.1
  • linXaw3dXft 1.6.2b
  • netpbm 10.47.05
  • psutils 1.17


Step 1: Install XPaint

Login with admin role (root) and type

# yum install xpaint
type y and press Enter

Step 2: Start XPaint

On the Centos Linux desktop, choose Applications-> Graphics ->XPaint


Click "Canvas" button and choose "New Canvas"




Tips on initial use of XPaint


Open an image to edit
File-> Open image...

Drawing lines, rectangle, circles, polygon
Click the Tool icon and choose the drawing tool.

Done.

Monday, August 30, 2010

Plasma widget error - "could not create a python scriptengine"

In Kubuntu 10.04, Adding widgets may give webkit and scriptengine errors. Here are some of the solutions.

"could not create a python scriptengine"
When installing Solar System widget to desktop, that error appears. Solution is to install plasma-scriptengine-python, e.g. at the terminal (CLI) type;
sudo apt-get install plasma-scriptengine-python


"could not create a webkit scriptengine for the scripted image widget"
When installing Scripted Image widget to desktop, above error appears. Solution, install plasma-scriptengine-webkit. E.g. at CLI type;
sudo apt-get install plasma-scriptengine-webkit

-the end-

Sunday, May 23, 2010

Add Screensavers in KDE4

Screensavers are graphics that replaces the normal desktop screen when it is idle too long (it depends on the user setting). This should reduce the burnout of the screen and also hides the desktop contents from passing eyes.

Default install of Kubuntu did not have any of the nice screensavers. Check the screensavers by choosing the KMenu ->system Settings
Choose the General tab ->Desktop ->Screen saver


To install additional screensaver, use the Software Management such as KPackagekit or synaptic and install

kscreensaver-xsavers-extra

This can also be done at the terminal by typing
$ sudo apt-get install kscreensaver-xsavers-extra

This installs
kscreensaver
kscreensaver-xsavers
kscreensaver-xsavers-extra
libgle3
netpbm
xscreensaver
xscreensaver-data
xscreensaver-data-extra
xscreensaver-gl
xscreensaver-gl-extra

Install optional items;
$ sudo apt-get install xfishtank qcam streamer

Thursday, March 4, 2010

Linux driver in use

From a terminal window;

To view all device drivers and the module names
$ lspci -k

To view a specific device (e.g. 03:00)
$ lspci -vv -s 03:00

To view all the loaded modules (The letter 'K' is uppercase in Kernel)
$ lsmod
$ lspci -k |grep Kernel

Sunday, May 3, 2009

[Jaunty]Installing scanning and photo editing tools on Kubuntu 9.04

In a fresh install of Kubuntu Jaunty 9.04, the next best thing to do is try out its scanning and photo editing capabilities.

$ sudo apt-get install gimp gimp2.0-quiteinsane gimp-gutenprint gimp-data-extras

This install GIMP the popular photo editor and the SANE tools for scanning.

[Jaunty]Adding the VLC video player

Kubuntu Linux 9.04 supports the VLC video player very well. In a fresh install, open the terminal and type

$ sudo apt-get install vlc videolan-doc mozilla-plugin-vlc vlc-plugin-sdl libvcdinfo0

Saturday, May 2, 2009

First look at Kubuntu 9.04 Jaunty

I have just completed a number of fresh install of Kubuntu Jaunty 9.04 Linux on a
Lenovo R60 (9459BF8) 32 bits
CPU T5600 @ 1.83GHz
L1 64KiB
L2 Cache 1984KiB
RAM 1Gb


Here are some quick comments:


The KMenu
This is the KDE Start Menu. One of its main menu options is the Favourites. This contain the Konqueror, Kontact, System Settings, Dolphin, Kopete and Amarok menu. Users should add frequently used programs here.

Desktop
There is a desktop that takes only a small place on dashboard. There are Plasmoid widgets that can be added to the dashboard to increase user experience. to view only the Dashboard, press Ctrl+F12 (or press the Show Dashboard Applet in thebottom panel) to dim all applications and view only the widgets and Desktop.

Workspace
Default Kubuntu had only 2 workspace and no keyboard shortcut to switch betweenmany workspaces. I can only return to 1st workspace with Ctrl+F1.

1. Right click Pager applet (in the bottom panel) and choose "Configure Desktop", increase to 4 workspace.

Screen
The screen is sharp and nice, which is why I have always choosen KDE when Looks matter.

Quick look at accessing applications
Web browser: Konqueror 4.2.2
Office: OpenOffice.org 3.0.1
Print screen: Ksnapshot 0.8.1 (The PrtSc button problem have been fixed)
Terminal: Konsole 2.2.2
System process: (Ctrl + Esc)
Software installer: KPackageKit
Desktop: KDE 4.2.2 (Ctrl + F12) One cool and futuristic desktop for all.
Compression tool: Ark 2.12 (Integrated well with Dolphin)

Others:
  1. Initially I could not login to my home wireless network. Had to manually use the iwconfig, it could load automatically there onwards. So, if you have the same problem, open a terminal and type the following to detect your wireless network (e.g. mywireless)
    $ sudo iwlist wlan0 scanning essid looney
  2. I could resize the KPanel to a smaller size easily.
  3. First site I went with Konqueror was the blogspot.com and all looks good. Only problem is that the default menus during editing of post did not allow me to change the fonts. Only option allowed was spelling, Add image and Preview. A pop-up appeared with the need to install Shockwave Flash plugin but it keeps failing to install. See below for the resolution.
  4. Konqueror did not refresh properly when used as a web browser.
  5. The Amarok did not have any sound when playing an mp3. The midi file was not supported at all.
  6. The add/remove software manager did not seem to function. I cant get a list of software and it kept crashing. I needed to choose "Software Updates" ->Refresh. First thing I did is to install Kubuntu-restricted-extras package.

Post installation recommendations
At the terminal run
$ sudo apt-get install flashplugin-installer msttcorefonts
Open Konqueror, when it ask to install the Flash plugin this will now be successful.

$ sudo apt-get install kubuntu-restricted-extras
This will add JRE, mp3, mpeg, odbc, unrar and other useful support.

$ sudo apt-get install tpb
This will allow the Thinkpad special keys to be available. To install this package, the following package is removed:
hotkey-setup


$ sudo apt-get install gdecrypt password-gorilla
This allows the disk to be encrypted and manage passwords.

$ sudo apt-get install wine wine-gecko
This will allow installation of standard MS Windows based applications.

$ sudo apt-get install ssh sshfs ksshaskpass kdessh
Allow secure SSH connection to and from SSH servers.


Conclusion
Jaunty is a great Linux distro, but those who cannot accept the KDE4 changes should continue with Gnome on Ubuntu Linux.

Thursday, April 16, 2009

Scanning with Kubuntu Intrepid and KDE 4.3

Scanning with Kubuntu Intrepid is easy with Xsane and EPSON Perfection 1250 scanner. XSane is GPL and is currently at version 0.995

Step 1:
sudo apt-get install xsane xsane-doc

Step 2:
Plug in the USB connection to the computer and from the KMenu choose Application ->Graphics ->XSane

You can see that the scanner is detected by typing the command

lsusb

Step 3:
In the XSane Window leave all as default except the settings for;
Viewer
File location and name (I choose a PDF name)
Type by ext
Color/Lineart/Monocrome
Resolution to minimum 150

Step 4:
In the XSane Preview Window, choose Full Size then "Acquire Preview". When this is done the first time, it takes a while.

In the XSane Window, press "Scan". Make sure it is the image that you want and continue by choosing File ->Save Image.

Note:
To scan multiple pages into one PDF, change the Viewer to multipages.

Friday, March 20, 2009

CentOS graphics

Development of CentOS is partly using the custom graphics. Below is a link to the graphics used in CentOS.

http://dev.centos.org/centos/graphics/

Sunday, March 15, 2009

Gwenview plugins and KDE 4.2

Since KDE 4.2 adopts many new features, Gwenview (the graphics viewer) may not have all the correct versions of library and applications to use.

Gwenview uses KDE4 but the kipi-plugins on 8.10 needs a newer libexiv and kipi-plugins. This results in the default Gwenview not having any plugins. Only KDE 4.2 systems (default 8.10 doesnt have this) will be effected.

To install the plugins, add to the repository the followng PPA site. Choose from the panel, Kmenu ->Applications ->Add/Remove Software. Edit the sources ->Third party with the following:

deb http://ppa.launchpad.net/digikam-experimental/ppa/ubuntu intrepid main

This should update itself. If it does not do any updates, then at the command line, run command apt-get update, and install the new kipi-plugins.

sudo apt-get install digikam kipi-plugins kdeprint

The following are installed:
digikam kipi-plugins libkdcraw7 libkexiv2-7 liblensfun-data liblensfun0 libmarble4 libqt4-sql-sqlite marble-data

Suggested packages:
digikam-doc gallery vorbis-tools

Recommended packages:
kdeprint

See
http://www.digikam.org/drupal/node/421

Friday, February 20, 2009

Recording desktop session

In preparation for a presentation for an OSS Seminar at CIAST this 25 Feb, a demo of the desktop is required. KUbuntu comes with several desktop recording packages.
  • istanbul
  • ffmpeg
  • KRecordmyDesktop
KRecordmyDesktop
KRecordmyDesktop is a KDE application to record desktop session. Command to install is

sudo apt-get install krecordmydesktop recordmydesktop

Then run the program from a terminal (CLI).

$ krecordmydesktop

At the panel, right click the KrecordmyDesktop and start recording. This will save the session as an .ogg file. Most Linux movie players can use the .ogg file.

I found that the KRecordmyDesktop did not have any delay to start/end recording. This resulted in having to use the recordmydesktop program directly.

The recordmydesktop
This is a program that can record a desktop and save it on the fly OR when the recording ends. Frontends to this is the KRecordmyDesktop and grecorgmydesktop.

Recording can be done at the command line which saves to the file out.ogv by default;

recordmydesktop --no-sound -delay 3 -o filename

The default control keys during a record session:

1. Pause / Resume recording - Ctrl+Alt+p
2. Stop recording - Ctrl+alt+s

More details can be found at recordmydesktop.

Viewing in AVI
To convert the .ogg to .avi install ffmpeg or mencoder. The tools are run at a terminal to convert the .ogg file.

The ffmpeg

Step 1: Install the program. Include the dependency files of libavdevice52 libimlib2.

sudo apt-get install ffmpeg

Step 2: Start the converter. The -target, -r and -s is optional.

ffmpeg -i kdesession.ogg -target vcd -s vga -r 52 kdesession3.avi

The mencoder
Alternative encoder is mencoder (used with mplayer).

Step 1: Install mencoder.

sudo apt-get install mencoder

Step 2: Convert the .ogg file to .avi with no sound effects.

mencoder kdesession.ogg -ovc lavc -nosound -o kdesession3.avi

There are lots of configuration options in ffmpeg and mencoder from the help files.

Saturday, December 27, 2008

Photos and Gwenview

Introduction
Just tried to view photos from the dolphin file manager. Default of Kubuntu Intrepid is to launch Gwenview 2.1.3 which is rather new to me.

It is a nice basic tool that still uses KDE3. This may explain why the Gwenview plugin did not detect the KDE Image Plugins Interface (KIPI) which is kipi-plugins version 0.1.5-1ubuntu2 at the moment. It still doesnt show the EXIF info of photos. Keyboard short cuts are still not completely incorporated for faster navigations.

The main configuration files are:
  • gwenview.rc
  • gwenviewui.rc
View mode
The photo name and size is displayed on the right sidebar. Other functions are found on the right sidebar to edit the image and to manage file operations such as move and copy photos. I have not found a way to move to next photo without going to the browse mode. The PgUp and PgDn keys did not function as I'd like it to. I need to click on the flimstrip (enabled by choosing the "Thumbnail Bar" button) to allow the right and left arrow keys to move between photos.

The slider bar at the bottom allows a neat quick a zoom feature.

Gwenview in view mode.

Browse mode
Allows quick access to all photos. This includes basic editing features of rotation, mirror, flip, resize and crop.
Gwenview in browse mode.

Gwenview was not attractive enough at first glance but it takes time for one to grow interest in it.

Blog Archive