Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

71%
+3 −0
Q&A How to make background transparent and trim to content

I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps at once an...

posted 2y ago by samcarter‭  ·  edited 2y ago by samcarter‭

Answer
#5: Post edited by user avatar samcarter‭ · 2023-01-13T09:53:32Z (almost 2 years ago)
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically and reproducibly:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • (depending on how you make your documents, one might even incorporate this conversion into your document making workflow)
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps at once and reproducibly:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • (depending on how you make your documents, one might even incorporate this conversion into your document making workflow)
#4: Post edited by user avatar samcarter‭ · 2023-01-13T09:49:53Z (almost 2 years ago)
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically and reproducibly:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically and reproducibly:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • (depending on how you make your documents, one might even incorporate this conversion into your document making workflow)
#3: Post edited by user avatar samcarter‭ · 2023-01-13T09:47:45Z (almost 2 years ago)
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically and reproducibly:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
#2: Post edited by user avatar samcarter‭ · 2023-01-13T09:47:23Z (almost 2 years ago)
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will to all your steps automatically:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
  • I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will do all your steps automatically:
  • ```
  • convert test.gif -transparent white -gravity south -chop x60 -trim output.png
  • ```
  • > ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)
  • Explanation of the steps:
  • - `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)
  • - `test.gif`: name of the input file
  • - `-transparent white` replaces the white background with a transparent background
  • - `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)
  • - `-trim`: will remove all superfluous space around your shape
  • - `output.png`: name of the resulting file
#1: Initial revision by user avatar samcarter‭ · 2023-01-13T09:45:33Z (almost 2 years ago)
I don't know if or if not this is possible from within grafx2, but your manual workflow can be simplified dramatically by using image magick. The following command will to all your steps automatically:

```
convert test.gif -transparent white -gravity south -chop x60 -trim output.png
```

> ![resulting image after conversion with transparent background and cropped to the content](https://powerusers.codidact.com/uploads/3xw8uxld7qy070eyh2o2r8g2hn69)

Explanation of the steps:

- `convert`: calls the convert command from the image magick bundle (it may be called differently if you use windows)

- `test.gif`: name of the input file

- `-transparent white` replaces the white background with a transparent background

- `-gravity south -chop x60`: cuts off 60 pixel from the bottom of the image to get rid of the black bar (the exact number might need find tuning, that was just my quick estimate)

- `-trim`: will remove all superfluous space around your shape

- `output.png`: name of the resulting file