Open-source News

Firefox 112 Now Available With Support For Importing Chromium Snap Browser Data

Phoronix - Mon, 04/10/2023 - 23:15
Mozilla has published the Firefox 112.0 binaries today ahead of tomorrow's official unveiling...

OpenBSD 7.3 Released With AMD RDNA3 Graphics, Guided Disk Encryption

Phoronix - Mon, 04/10/2023 - 22:35
Theo de Raadt has released OpenBSD 7.3 today as the 54th release for this BSD operating system project...

Intel oneAPI Level Zero Loader 1.10 Released

Phoronix - Mon, 04/10/2023 - 20:43
Intel has released oneAPI Level Zero Loader 1.10 today, which implements the Level Zero v1.6 specification...

RADV Driver Enables Graphics Pipeline Library Support By Default

Phoronix - Mon, 04/10/2023 - 19:07
In time for the upcoming Mesa 23.1 branching and feature freeze, Samuel Pitoiset of Valve's Linux graphics driver team has enabled the graphics pipeline library "GPL" support by default with the Radeon RADV Vulkan driver...

AMD Has Some Linux Fixes For Older "Picasso" Ryzen Laptops On The Way

Phoronix - Mon, 04/10/2023 - 18:58
While AMD Zen 4 "Dragon Range" and "Phoenix" laptops are imminent, for those using an older AMD Picasso laptop design from 2019, there are some new Linux fixes on the way for enhancing that older Zen+ experience...

Intel Media Driver 2023Q1 Adds Meteor Lake AV1 Error-Resilient Video Encoding

Phoronix - Mon, 04/10/2023 - 18:47
The Intel Media Driver 2023Q1 has been published as the newest feature release for Intel's open-source video acceleration driver providing VA-API support across generations of their integrated graphics as well as newer discrete graphics...

NeoMagic & Savage Linux X.Org Drivers Updated For Late 90's Graphics

Phoronix - Mon, 04/10/2023 - 18:28
Longtime X.Org release wrangler Alan Coopersmith at Oracle spent some of his Easter working out new releases of seldom-touched X.Org graphics/display drivers...

Remove the background from an image with this Linux command

opensource.com - Mon, 04/10/2023 - 15:00
Remove the background from an image with this Linux command Don Watkins Mon, 04/10/2023 - 03:00

You have a great picture of yourself and want to use it for your social media profile, but the background is distracting. Another picture has a perfect background for your profile picture. How do you combine the two? Some smartphone apps that do this kind of photo manipulation but are too expensive or are riddled with ad-ware. And they aren't open source. Rembg is up to the challenge!

Rembg is written in Python, so install Python 3 on your computer. Most Linux distributions include Python 3 by default. You can check your version with this simple command:

$ python3 --version

Rembg requires at least Python 3.7 and no greater than Python 3.11. In my case, I have Python 3.10.6 installed.

Install Rembg on Linux

I created a directory called PythonCoding on my Linux laptop and then made a Python virtual environment:

$ python3 -m venv /home/don/PythonCoding

Next, I installed rembg using pip:

$ python3 -m pip install rembgCombine images

Time to work some magic. First, I chose the image containing a picture taken at All Things Open in 2019.

Image by:

(Don Watkins, CC BY-SA 4.0)

I ran the following rembg command to rename it with a shorter filename for convenience:

$ rembg i dgw_ato.jpeg dgw_noback.jpg

The first time you run rembg, it downloads an open source pattern recognition model. This can be over 100 MB and rembg saves it in your user directory as ~/.u2net/u2net.onnx. The model is the U-2-Net and uses the Apache 2.0 license. For more information about the pattern recognition models (including how to train your own), read the Rembg documentation.

It created my new photo without the background in about ten seconds. I have a Ryzen 7 with 16 GB of RAM. Your experience may vary depending on your hardware.

Image by:

(Don Watkins, CC BY-SA 4.0)

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles

I have used GIMP to remove backgrounds in the past, but rembg does it quicker and more completely than I have experienced with GIMP.

That's all there is to removing a background. What about adding a new one?

Add a new background

Next, I want to add a new background to the picture. There are different ways to do that. You can, for instance, combine images with ImageMagick, but getting the frame size right can be complex. The easiest way is to use GIMP or Krita.

I used GIMP. First, open the newly created image (ato_image.jpg in my case). Now go to the File menu and select Open as layers. Choose a different image for the background. This image opens as an overlay above the existing photo.

I wanted to move the new background below my portrait. On the right of the GIMP window are two thumbnails, one for each image layer. The background layer is on top. I dragged the background layer beneath my portrait image, and here's the result:

Image by:

(Don Watkins, CC BY-SA 4.0)

That's a much nicer setting for my profile picture!

Try Rembg

Rembg has three subcommands you can review in the --help menu:

$ rembg --help

They are:

  • rembg i for files
  • rembg p for folders
  • rembg s for HTTP server

Rembg is released with an MIT license. Try it the next time you need a background removed from an image.

The power of Python makes image editing easy on Linux.

Image by:

Opensource.com

Python Linux Art and design What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How To Install MySQL Server on Ubuntu 22.04/Ubuntu 20.04

Tecmint - Mon, 04/10/2023 - 14:11
The post How To Install MySQL Server on Ubuntu 22.04/Ubuntu 20.04 first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

MySQL community server is a free open-source, popular, and cross-platform database management system, which supports both SQL and NoSQL and has a pluggable storage engine architecture. Additionally, it also comes with multiple database connectors for

The post How To Install MySQL Server on Ubuntu 22.04/Ubuntu 20.04 first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

Linux 6.3-rc6 Released For Easter

Phoronix - Mon, 04/10/2023 - 03:08
Linus Torvalds just released Linux 6.3-rc6 for this Easter Sunday as we work towards the official Linux 6.3 debut in the next few weeks...

Pages