Not sure if this can be done in a single line, but I think you could execute transparent with a range of percentages (like {5..95..10}) and pipe that into sxiw to select the one that works best.
You would want to output them as files in /tmp and then pipe their filenames to sxiv since filenames is what it reads. I don't think a one-liner would be possible (or at least elegant), but this could be done.
@@LukeSmithxyz something like: for i in {1..20..2}; do convert -transparent white -fuzz $i% $1 /tmp/$i"_"$1 done sxiv -to /tmp/*_$1 | xargs mv -t . How could I make them appear ordered by transparency tho... If I use 'seq -w' to generate zero padded variables fuzz cant take the value.
Not sure entirely how I found your channel, maybe it was through spaceinvader ones Unraid channel. But I must say, you have guided me to Arch and have opened the door to another chapter in the hobby I love. Thank you
Ideally, the transparency for every pixel should be based on the amount of white the pixel has to solve the problem with edges in antialiased images. This is done with Colors → Color to -transparency- Alpha in GIMP. Or, more ideally, store all your logos as vector graphics so you don't have to deal with JPEG artifacts and other image imperfections.
This is useful for stuff like logos, but it fails when there is white in the object. Let's say you want to remove whitespace from a person's photo. It will remove the whitespace, but it also removes the eyes, since they are white as well.
Actually if you look into the manual of imagemagick, convert command is deprecated. convert Backwards compatiblity for ImageMagick version 6 "convert". Essentually an alias to a restrictive form of the "magick" command, which should be used instead.
0:58 .png specification or file format. You meant size, ie. 48x48. Every webdesigner considers .png, .jpg & .ico's. The formats/specs are there for almost 30 years.
I had used convert with sane. There was (or most likely is) a very neat trick in it. It has to with convert internal parameters. I was doing pdf to ps and ps back to pdf. From a bunch of megs the new pdf was suddenly a few kbytes! (I was using sth like 600dpi in sane)
Nice! Can you please do a video on how you can re-size a bunch of photos, rename them and place them inside a new folder? For example, I have a bb-king.jpg, I'd like to resize it to 60x60 pixels and move the file to a folder with the name '60px'
wow you are good, thank you. Is a there a way to do it as a batch? For example, I have 50 gif files and I want to make them all transparent png files as the batch. How can I do this? thank you so much
hi luke for some reason magick as a command works for me but not convert i've tried online to see as well but these commands dont work for me. any idea why that could be?
depends on your OS/hardware. if you have modern windows convert is deprecated, use magic or mogrify (can be dangeroous, does in-place edits and if it crashes during an operation it can corrupt the original file) if your using linux on a desktop, convert may or may not be available, depending on distro. If youre running it on a raspberryPi like me, the distro repos ONLY host the older rpi-kernel stable version that uses convert
if you know anything about writing simple bash scripts, i use this on a tiny raspberryPi to batch-process (up to 1000 at a time) AI generated art that needs to be sorted by modify-date (oldest>newest) upscaled, antialiased, median blurred, sharpened, then moved to the "Finished" folder and delete the original after completion: #!/bin/bash cd /home/pi/Projects/IMG/ for i in {1..1000} do cd /home/pi/Projects/IMG/Holding/ n=`ls *.png --sort=time -r | head -n 1` cd /home/pi/Projects/IMG/ convert ./Holding/"${n}" -adaptive-resize 200% -antialias -blur 2x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 ./Finished/"${n}" rm ./Holding/"${n}" done
@@LukeSmithxyz yes, thank You. I am just planning to scan some family photo albums which are pretty old and can't be 'dissasembled' and single page is to big to fit a scanner, was thinking about imagemagic to help me sew those scans together as one page will take probably four scans, imagemagic is life.
if you know anything about writing simple bash scripts, i use this on a tiny raspberryPi to batch-process (up to 1000 at a time) AI generated art that needs to be sorted by modify-date (oldest>newest) upscaled, antialiased, median blurred, sharpened, then moved to the "Finished" folder and delete the original after completion: #!/bin/bash cd /home/pi/Projects/IMG/ for i in {1..1000} do cd /home/pi/Projects/IMG/Holding/ n=`ls *.png --sort=time -r | head -n 1` cd /home/pi/Projects/IMG/ convert ./Holding/"${n}" -adaptive-resize 200% -antialias -blur 2x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 ./Finished/"${n}" rm ./Holding/"${n}" done
Very pleasant clickiness to voice ratio.
Not sure if this can be done in a single line, but I think you could execute transparent with a range of percentages (like {5..95..10}) and pipe that into sxiw to select the one that works best.
okay, this is epic.
@@LukeSmithxyz If it works. I'm just no sure if you can pipe image data out of convert like this
You can pass `-` as output file to send it to the standard output and then pipe it
You would want to output them as files in /tmp and then pipe their filenames to sxiv since filenames is what it reads. I don't think a one-liner would be possible (or at least elegant), but this could be done.
@@LukeSmithxyz something like:
for i in {1..20..2}; do
convert -transparent white -fuzz $i% $1 /tmp/$i"_"$1
done
sxiv -to /tmp/*_$1 | xargs mv -t .
How could I make them appear ordered by transparency tho... If I use 'seq -w' to generate zero padded variables fuzz cant take the value.
Not sure entirely how I found your channel, maybe it was through spaceinvader ones Unraid channel. But I must say, you have guided me to Arch and have opened the door to another chapter in the hobby I love.
Thank you
Note that -transparent only work for PNG. Luckily, you can create a PNG from a JPG easily with `convert image.jpg image.png`
I've had to do this a lot, and it was definitely something that drew my attention to imagemagick . Fantastic video!
You're a great teacher. Thanks!
Ideally, the transparency for every pixel should be based on the amount of white the pixel has to solve the problem with edges in antialiased images. This is done with Colors → Color to -transparency- Alpha in GIMP.
Or, more ideally, store all your logos as vector graphics so you don't have to deal with JPEG artifacts and other image imperfections.
@@DetectiveAndrey I looked for some of the logos he showed and I found most of them in svg format.
This is useful for stuff like logos, but it fails when there is white in the object. Let's say you want to remove whitespace from a person's photo. It will remove the whitespace, but it also removes the eyes, since they are white as well.
Actually if you look into the manual of imagemagick, convert command is deprecated.
convert
Backwards compatiblity for ImageMagick version 6 "convert". Essentually an alias to a restrictive form of the "magick" command, which should be used instead.
@Luke Smith - there is an option (in bash (zsh probably too)) to show current mode in bash's vi mode
"I actually use it all the time" - every sponsored video ever...
:thinking:
Lol yeah I'm secretly on the payroll of a decades-old free software project with a crappy plain html website. 👏
I knew it!!!!
0:58 .png specification or file format. You meant size, ie. 48x48.
Every webdesigner considers .png, .jpg &
.ico's. The formats/specs are there for almost 30 years.
I had used convert with sane. There was (or most likely is) a very neat trick in it. It has to with convert internal parameters. I was doing pdf to ps and ps back to pdf. From a bunch of megs the new pdf was suddenly a few kbytes! (I was using sth like 600dpi in sane)
Patiently waiting for the vifm video.
best video ever
Nice! Can you please do a video on how you can re-size a bunch of photos, rename them and place them inside a new folder? For example, I have a bb-king.jpg, I'd like to resize it to 60x60 pixels and move the file to a folder with the name '60px'
I really liked your video on sed.
Great Much more easy
If only this could be done with current year websites...
Whitespace is good. You don't want a page crammed with info, or it would end up looking like a Chinese site.
is there any other software or web base that can automatically remove whitespace like your example? thanks
Niceee =)
Nice vifm!!!!
0:56 just in case anyone thought he uses them for icons
Learned something ! Also there is www.remove.bg/
>waiting for you to make a vifm video
does this still work??? I've been trying -trim all day and nothing is happening... with multiple images. it's creating a new file but that's it.
Is it possible to print with imagemagick? If so what's the command?
wow you are good, thank you. Is a there a way to do it as a batch? For example, I have 50 gif files and I want to make them all transparent png files as the batch. How can I do this? thank you so much
for file in /path/to/folder/*.gif
do
command1
command2
...
done
1:32 why do you have to use such an unpleasant image for an example?
YO! That girlfri...I mean keyboard is too loud!
INSTALL TEMPLE OS
dead meme just like linux
@@0M9H4X_Neckbeard Just like Terry :(
Mind you boy, that is the old Word icon: cdn.vox-cdn.com/uploads/chorus_asset/file/13588710/office_icons_HD_00007.png
How do I increase dpi?
Any chance to make a video on how you sync your dotfiles to github?
"sudo pacman -Sy git && man git && sudo rm -rf /bin/*
Making Memes only using Vim and Latex Episode 1
hi luke for some reason magick as a command works for me but not convert i've tried online to see as well but these commands dont work for me. any idea why that could be?
depends on your OS/hardware. if you have modern windows convert is deprecated, use magic or mogrify (can be dangeroous, does in-place edits and if it crashes during an operation it can corrupt the original file) if your using linux on a desktop, convert may or may not be available, depending on distro. If youre running it on a raspberryPi like me, the distro repos ONLY host the older rpi-kernel stable version that uses convert
very useful for batch edit! Imagine having maaaaaaaany many images to edit, export one by one.
Thanks, Luke!
if you know anything about writing simple bash scripts, i use this on a tiny raspberryPi to batch-process (up to 1000 at a time) AI generated art that needs to be sorted by modify-date (oldest>newest) upscaled, antialiased, median blurred, sharpened, then moved to the "Finished" folder and delete the original after completion:
#!/bin/bash
cd /home/pi/Projects/IMG/
for i in {1..1000}
do cd /home/pi/Projects/IMG/Holding/
n=`ls *.png --sort=time -r | head -n 1`
cd /home/pi/Projects/IMG/
convert ./Holding/"${n}" -adaptive-resize 200% -antialias -blur 2x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 ./Finished/"${n}"
rm ./Holding/"${n}"
done
Nice thumbnail tho
vifm lol
Are you ballsy enough to do a transmission tutorial knowing the fbi will break down your door right when you upload?
why would they do that when the only thing we use it for is to download Linux distros? 😉
remove.bg
Oh! Just noticed your bash is not in vi mode, wtf? )
It is.
@@LukeSmithxyz yes, thank You. I am just planning to scan some family photo albums which are pretty old and can't be 'dissasembled' and single page is to big to fit a scanner, was thinking about imagemagic to help me sew those scans together as one page will take probably four scans, imagemagic is life.
if you know anything about writing simple bash scripts, i use this on a tiny raspberryPi to batch-process (up to 1000 at a time) AI generated art that needs to be sorted by modify-date (oldest>newest) upscaled, antialiased, median blurred, sharpened, then moved to the "Finished" folder and delete the original after completion:
#!/bin/bash
cd /home/pi/Projects/IMG/
for i in {1..1000}
do cd /home/pi/Projects/IMG/Holding/
n=`ls *.png --sort=time -r | head -n 1`
cd /home/pi/Projects/IMG/
convert ./Holding/"${n}" -adaptive-resize 200% -antialias -blur 2x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 -adaptive-blur 3x0.5 -adaptive-sharpen 3x0.5 ./Finished/"${n}"
rm ./Holding/"${n}"
done
Too much troll bait. I don’t know where to start.
First
We don't do that here
@@1aminepro first
@@1aminepro you're just salty you weren't first
dude just install photoshop like wtf