Search

Creating pencil sketch of an image in linux using pinta

Here is how we can create the pencil skethc of any image using the software pinta in linux.

If you do not have pinta installed, you can install it using the package manager. In debian based systems we can run



Now launch pinta, In debian it would be listed under Applications->graphics, might be different for other distros.

Now click on



 photo open.png

Browse the image for which the pencil sketch is need to be made, and click on open. Let us take the image of our beloved tux for creation of a pencil sketch.

 photo tux.png

Now click on



 photo menu.png

The following menu will pop.

 photo pencil_menu.png

Pencil tip size: Higher this value more dark the image looks.
Color range: Higher the value more mix of white and balck will appear in the image.

As the change in these options are done, the changes in the image can be seen in the backgroud. Which ever values are satisfctory click ok for those and the pencil sketch image is ready. Here is the pencil sketch image of tux.

 photo tux_pencil.png


Adding fog effect using gimp

Here is how we can add the fog effect to any image, using gimp.

Lunch gimp and click on



Browse to the photo that is to which the fog effect has to be added and click on open.

In the example we will use the following image to add the fog effect.

 photo DSC00302-1.jpg

Now click on



 photo 2_fog_select.jpg

This will launch a window as shown below.

 photo fog_menu.jpg

The options available are

Name: Layer Name Color: The color of the fog Turbulence: How much fog should be added to the image Opacity: How opaque should the fog be.

Click on OK and wait for gimp to do the magic.

After applying the fog, the above image looks as below.

 photo fogged_pic.jpg


Quiz based on chapter-4 of book linux device drivers 3rd ed

Quiz on chapter-4 of book linux device drivers 3rd ed

Quiz on chapter-4 of book linux device drivers 3rd ed

  1. Which of the following config options need to be enabled to be able to debug kernel.

  2. CONFIG_DEBUG_KERNEL
    CONFIG_USB
    CONFIG_EXT4
    CONFIG_DBG

  3. The first argument passed to printk specifies the

  4. loglevel for the message to be printed
    terminal number for the message to be printed
    userid of the current user
    line number in which the message has to be printed

  5. The command that can be used to view the kernel logs from user space is

  6. kmesg
    dmesg
    kmsg
    dmsg

  7. The function create_proc_read_entry returns a pointer to

  8. struct proc_dir
    struct proc_entry
    struct proc_dir_entry
    struct proc

  9. The seq file interface is used for

  10. logging errors in kernel space
    Creating a /proc entry
    Passing user information to kernel
    Passing kernel information to user space

  11. output of strace shows

  12. The function calls made by user applications
    The system calls made by a user application
    The kernel modules used by a user application
    The various applications running in the user space.

  13. In a kernel oops message EIP points to

  14. The address of the faulty instruction
    The faulty instruction
    The faulty line in the user code
    The faulty user application

  15. While using gdb for kernel debugging the kernel core file used passed to gdb is

  16. /proc/core
    /proc/kcore
    /dev/core
    /dev/kcore

  17. Which of the following keys will launch the kdb

  18. sysrq
    pause
    shift
    del

  19. To use kgdb we need two systems connected by a serial cable

  20. True
    False
    depends on kernel version
    depends on kgdb version

Script to download the latest linux kernel

Here is a script that will download the latest kernel source kernel.org. THe script works on the current html page of kernel.org and might break if anything is changed in the page of kernel.org.

latest_kernel:



save the script as latest_kernel.sh.

Run the script by giving it execute permission. Please note that the from which ever folder the script is executed the user running the script needs to have the permission to create and delete files and folders as the script places the downloaded source in the same folder and also creates a temporary file and deletes it.



Thus we can see from the ouput that the latest kernel 3.10.4 has been downloaded. In case the download gets interrupted then the script will retry the download 3 times before quitting with the message of "Download Failed".

Follow by Email