Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Ask the user to select an image file
- file_path=$(zenity --file-selection --title="Select an image")
- # demande à l'utilisateur quel niveau de charbonage.
- echo "Choisir un niveau de charbonage (1-5):"
- read charbonage
- # Convert the image to the chosen colorspace
- convert "$file_path" -charcoal "$charbonage" "temp.jpg"
- # Show a preview of the converted image
- xdg-open "temp.jpg"
- # Ask the user if they want to keep the converted image
- echo "Do you want to save this converted image? (yes/no)"
- read answer
- if [ "$answer" = "yes" ]; then
- mv "temp.jpg" "$file_path"
- else
- rm "temp.jpg"
- fi
Advertisement
Add Comment
Please, Sign In to add comment