Replace txt file hex colors in current image
Posted: 2017-02-08T03:30:22-07:00
So, I'm trying the following:
1.) have a hex.txt with hex values
2.) have a png file where I want to remove said hex (by replacing it w. #000000)
My command looks like this:
Sadly, this won't replace anything in the picture (despite the hex values def. being in there)
Instead I keep getting error messages to no end.
Ideas on what might be wrong ?
1.) have a hex.txt with hex values
2.) have a png file where I want to remove said hex (by replacing it w. #000000)
My command looks like this:
@echo off
DEL heximage*
DEL newimage*
DEL hex.txt
cls
SET /P heximage=Drag and drop that contains the hex colors to remove:
copy %heximage% heximage.*
for /F "usebackq skip=1 tokens=3" %%C in (`%IM%convert rose: -depth 8 ^ txt:`) do echo %%C >>x.txt
findstr # x.txt >> hex.txt
DEL heximage.*
DEL x.txt
echo "Now removing Hex colors"
for /F %%c in (hex.txt) do for %%x in (*png) do convert %%x -fill "%%c" -opaque "#000000" %%x
Sadly, this won't replace anything in the picture (despite the hex values def. being in there)
Instead I keep getting error messages to no end.
Ideas on what might be wrong ?