Search found 21 matches

by etrader
2020-05-20T23:14:01-07:00
Forum: Users
Topic: How to get color edges when using -fill?
Replies: 1
Views: 667

How to get color edges when using -fill?

I convert a transparent PNG to black with convert 1.png -channel RGB -fill Black -colorize 100 +channel -blur 1x8 -background white -flatten 2.png https://i.ibb.co/r2176Rq/1.png https://i.ibb.co/VC3qz1j/2.png How can I turn the colour edges (for example, around eyes or face/mask lines) into white or...
by etrader
2020-05-02T15:34:42-07:00
Forum: Users
Topic: How to convert a transparent PNG to black & white?
Replies: 6
Views: 1687

Re: How to convert a transparent PNG to black & white?

snibgo wrote:
2020-05-02T14:27:08-07:00

Code: Select all

magick in.png -channel RGB -fill Black -colorize 100 +channel out.png
it works beautifully.
by etrader
2020-05-02T14:10:34-07:00
Forum: Users
Topic: How to convert a transparent PNG to black & white?
Replies: 6
Views: 1687

Re: How to convert a transparent PNG to black & white?

What version of IM, on what platform? Please provide a sample input. What does "by losing all textures" mean? Sorry for not providing my system information. Version: ImageMagick 7.0.8-34 Q16 x86_64 2019-03-18 Ubuntu 18.04 I want to turn the non-transparent part of PNG to pitch black with no texture...
by etrader
2020-05-02T12:38:11-07:00
Forum: Users
Topic: How to convert a transparent PNG to black & white?
Replies: 6
Views: 1687

How to convert a transparent PNG to black & white?

I want to convert a transparent PNG to a black silhouette. This means the transparent part should remain transparent (or white), the non-transparent part should be transformed into pure black by losing all textures. I tried -threshold 0%, but it retains some texture, as it turns the non-transparent ...
by etrader
2020-02-26T09:31:38-07:00
Forum: Users
Topic: Filter the output file when converting to text
Replies: 4
Views: 1828

Re: Filter the output file when converting to text

snibgo wrote:
2020-02-21T01:15:44-07:00
What version of IM, on what platform?
etrader wrote:The output has the colours in three formats:
But you show only two.

You could make white transparent, then write to "sparse-color:".
Aren't they three? RGB in the parenthesis, RGB hex, and the colour name. :D

ImageMagick 7.0.8-34 on Ubuntu.
by etrader
2020-02-21T00:51:30-07:00
Forum: Users
Topic: Filter the output file when converting to text
Replies: 4
Views: 1828

Filter the output file when converting to text

I convert greyscale images to txt files to analyse their bitmap coordinates. Since there is a line for each pixel, the files are huge, and obviously, I prefer to reduce the files by omitting unnecessary data. Albeit, I can remove unnecessary data by post-processing, but it is reasonable to avoid wri...
by etrader
2020-02-11T19:37:27-07:00
Forum: Users
Topic: How to tile and resize?
Replies: 1
Views: 1195

How to tile and resize?

I want to add text watermark on an image, and thus, used this code convert -size 140x80 xc:none -fill grey \ -gravity NorthWest -draw "text 10,10 'Copyright'" \ -gravity SouthEast -draw "text 5,15 'Copyright'" \ miff:- |\ composite -tile - original.png watermarked.png Since I need to resize/convert ...
by etrader
2020-02-08T08:18:26-07:00
Forum: Users
Topic: How to trim a large image?
Replies: 1
Views: 1128

How to trim a large image?

In a script, I trim supplied images with convert source.png -trim target.jpg everything works perfectly, but when a large picture with a large white area (e.g., 20,000px height with 80% white), the command freezes (32 cores work for hours but not output). I have no control over the supply of such an...
by etrader
2019-04-09T08:37:49-07:00
Forum: Users
Topic: How to crop by aspect ratio?
Replies: 4
Views: 4818

Re: How to crop by aspect ratio?

It works beautifully.

Anyhow, my version is ImageMagick 7.0.8-34 on Ubuntu.
by etrader
2019-04-09T00:43:44-07:00
Forum: Users
Topic: How to crop by aspect ratio?
Replies: 4
Views: 4818

How to crop by aspect ratio?

For resizing, we can tell IM to resize if an image is larger than a given size. Is it possible for crop (gravity) too? I want to prepare images for instagram, which apparently has limitations for aspect ratio: Landscape: 1.91:1 Portrait: 4:5 Can I tell IM to crop only if the image is beyond these as...
by etrader
2019-01-07T11:20:17-07:00
Forum: Users
Topic: Using GPU acceleration
Replies: 1
Views: 4803

Using GPU acceleration

I have ImageMagick installed on Ubuntu 18.04 from the official repository. The machine has AMD Radeon Vega 64 with AMDGPU driver installed from the official AMD website. I wonder if it is possible to use the GPU for hardware acceleration of convert or mogrify commands? Or I have to compile ImageMagi...
by etrader
2018-10-02T06:21:29-07:00
Forum: Users
Topic: How to convert SVG with exact size?
Replies: 2
Views: 2568

Re: How to convert SVG with exact size?

Excellent! Works perfectly. Thanks!
by etrader
2018-10-02T05:41:48-07:00
Forum: Users
Topic: How to convert SVG with exact size?
Replies: 2
Views: 2568

How to convert SVG with exact size?

I try to convert a series of SVG files to JPG with the following command

Code: Select all

mogrify -format jpg -size 1920x1080 -resize 1920x1080 *.svg
However, the dimension of the resulting JPG files is 1919x1080. How can I force ImageMagick not to alter 1px?
by etrader
2018-02-20T05:51:56-07:00
Forum: Users
Topic: Convert SVG to PNG
Replies: 1
Views: 1973

Convert SVG to PNG

I try to convert a series of SVG files to PNG with mogrify as mogrify -format png *.svg but the images are cropped to include the visible part only. How can I convert SVG to PNG with the original size? I do not want to use the sizeable feature of the vector. Instead, I just want to maintain the orig...
by etrader
2017-10-27T10:25:44-07:00
Forum: Users
Topic: How to resize large files only by mogrify
Replies: 2
Views: 2870

Re: How to resize large files only by mogrify

Oh my bad. Worked perfectly.