Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip original image #1

Open
liewcf opened this issue Aug 18, 2017 · 1 comment
Open

skip original image #1

liewcf opened this issue Aug 18, 2017 · 1 comment

Comments

@liewcf
Copy link

liewcf commented Aug 18, 2017

Sometimes we want to keep the original image without compression. Is it possible? Use an option or Skip files end with "-ori.jpg"?

@centminmod
Copy link
Owner

centminmod commented Aug 18, 2017

It isn't possible right now. I can see where that might be a usage case though I am not sure how I would implement that right now. Something to think about.

Possibly could extent the find command to exclude certain filename tags like you suggested. So to exclude -orig.jpg

instead of

find "$WORKDIR" -maxdepth ${MAXDEPTH}${FIND_IMGAGEOPT} \( -name '*.jpg' -o -name '*.png' -o -name '*.jpeg' \)

do

find "$WORKDIR" -maxdepth ${MAXDEPTH}${FIND_IMGAGEOPT} \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -not \( -name "*-orig.jpg" -o -name "*-orig.png"  -o -name "*-orig.jpeg" \) 

and instead of

find "$WORKDIR" -maxdepth ${MAXDEPTH}${FIND_IMGAGEOPT} \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" -o -name "*.webp" \) 

do

find "$WORKDIR" -maxdepth ${MAXDEPTH}${FIND_IMGAGEOPT} \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" -o -name "*.webp" \) -not \( -name "*-orig.jpg" -o -name "*-orig.png" -o -name "*-orig.jpeg" -o -name "*-orig.webp" \) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants