A
A
Anatoly2019-06-03 07:21:46
linux
Anatoly, 2019-06-03 07:21:46

Why do I get a black image when converting to ImageMagick: from PNG to JPG?

Debian 9 OS, ImageMagick utility.
I convert: convert file.png file.jpg
conversion goes without problems, but on some pictures when converting I get a completely black picture.
Where do I get the files with which the problem is:
in MS Word, I save the document in pdf format .
I open it in Photoshop and save it in png
. Problematic png files open normally. When converting to webp, there are no problems either:
/usr/bin/cwebp -q 75 -m 6 aaa.png -o $aaa.webp
Why do I get a black image when converting PNG -> JPEG, and how to overcome it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2019-06-03
@Tolly

First, don't be fooled and don't save from Photoshop with transparency. Secondly, imagemagick has a background key to set the background color. Thirdly, it is completely incomprehensible why saving black and white images in JPEG - in PNG without transparency, they will not take much.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question