LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-30-2024, 05:48 AM   #1
Sima86
LQ Newbie
 
Registered: Apr 2024
Posts: 1

Rep: Reputation: 0
ImageMagick -auto-level from xclip output


Greetings,

iam currently working on a project that processes images from a gallery.

Iam using a Raspberry Pi to clip a certain image url.

The image is usualy a bit too dark, so i would like to use
convert a.jpeg -auto-level a.jpeg (replaces the original image)

My second command takes the output of xclip (url) and downloads the file
sudo wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)


I want to combine both commands into one,
problem is, the image is generated when wget writes it.

so could i do something like this:
convert $(wget -A jpeg -O /home/pi/upload/a.jpeg $(xclip -o)) -auto-level /home/pi/upload/a.jpeg
?

my whole script currently looks like this
Quote:
#!/bin/bash
while true
do
image=/home/pi/Desktop/a.jpeg
upath=/home/pi/upload/
wget -A jpeg -O $image $(xclip -o)
convert $image -auto-level $image
sudo mv $image $upath
sleep 120
done
for reference, the convert -auto-level command https://imagemagick.org/script/comma...php#auto-level

Last edited by Sima86; 04-30-2024 at 06:26 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash script fails to read the "xclip -o" output's lenght windowsuser Linux - Newbie 10 04-18-2022 12:36 AM
LXer: xclip Does Copy-and-Paste on the Linux Command Line LXer Syndicated Linux News 0 07-03-2009 01:00 AM
install ImageMagick-6.5.1-2 & ImageMagick-devel-6.5.1.2 in red hat mokkai Linux - Enterprise 4 04-16-2009 12:04 PM
LXer: xclip - Copy contents from command line to X clipboard in openSUSE LXer Syndicated Linux News 0 04-14-2009 02:11 PM
emacs in run level 3 then switch to X (level 7) then back to level 3 dsoliver Slackware 3 09-01-2006 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration