Mailing List Archive

imagemagick display image edit tool draws an opaque background
In all of the imagemagick display installations I have, when I use the
image edit draw function, it includes an opaque background, rather than
just the lines themselves.  I've never had this with display(1) before,
and can find nothing in the internet about it.  That suggests to me that
it's - again - a use-flag issue.  Is there some use flag I have to use
to have a colored line with a transparent background?
Re: imagemagick display image edit tool draws an opaque background [ In reply to ]
On Sun, Aug 30, 2020 at 10:02:34PM +0200, n952162 wrote:
> In all of the imagemagick display installations I have, when I use the
> image edit draw function, it includes an opaque background, rather than
> just the lines themselves.  I've never had this with display(1) before,

First you use draw, which is used in convert, and then you speak of display.
The latter is there to – well – display an image. My understanding of IM
mechanics is basic, but just this evening I was working on a small IM-based
script of my own.

Drawing is done on a canvas. So unless you start with an existing image file
as a basis, IM needs to pick a default background colour, which in your case
seems to be black.

> and can find nothing in the internet about it.

Have you tried the IM website?
https://imagemagick.org/Usage/draw/
https://imagemagick.org/script/command-line-options.php#background

--
Gruß | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

The quickest way to a man’s heart is through his sternum.
Re: imagemagick display image edit tool draws an opaque background [ In reply to ]
On 2020-08-31 23:52, Frank Steinmetzger wrote:
> On Sun, Aug 30, 2020 at 10:02:34PM +0200, n952162 wrote:
>> In all of the imagemagick display installations I have, when I use the
>> image edit draw function, it includes an opaque background, rather than
>> just the lines themselves.  I've never had this with display(1) before,
> First you use draw, which is used in convert, and then you speak of display.


Please see the attached menu capture for "Image Edit ..."



> The latter is there to – well – display an image. My understanding of IM
> mechanics is basic, but just this evening I was working on a small IM-based
> script of my own.


If you left-click on the window, you get a menu that allows the full
range of editing capabilities.



>
> Drawing is done on a canvas. So unless you start with an existing image file
> as a basis, IM needs to pick a default background colour, which in your case
> seems to be black.


Yes, the problem is, I AM using an existing image.  Usually, with IM's
display(1), I could add lines and text to images but now, all of a
sudden, it uses a bounding box around the new strokes, choosing a single
random color from the background.


There's lots of USE flags associated with Image Magick, most of which I
have no clue about.  Perhaps I need some transparency support or something.


>
>> and can find nothing in the internet about it.
> Have you tried the IM website?
> https://imagemagick.org/Usage/draw/
> https://imagemagick.org/script/command-line-options.php#background
>
Re: imagemagick display image edit tool draws an opaque background [ In reply to ]
On Wed, Sep 02, 2020 at 09:00:38AM +0200, n952162 wrote:
> On 2020-08-31 23:52, Frank Steinmetzger wrote:
> > On Sun, Aug 30, 2020 at 10:02:34PM +0200, n952162 wrote:
> > > In all of the imagemagick display installations I have, when I use the
> > > image edit draw function, it includes an opaque background, rather than
> > > just the lines themselves.  I've never had this with display(1) before,
> > First you use draw, which is used in convert, and then you speak of display.
>
> Please see the attached menu capture for "Image Edit ..."
> […]
> If you left-click on the window, you get a menu that allows the full
> range of editing capabilities.

Ah, I forgot about that (never used it), sorry.

> > Drawing is done on a canvas. So unless you start with an existing image file
> > as a basis, IM needs to pick a default background colour, which in your case
> > seems to be black.

>
> Yes, the problem is, I AM using an existing image.  Usually, with IM's
> display(1), I could add lines and text to images but now, all of a
> sudden, it uses a bounding box around the new strokes, choosing a single
> random color from the background.

Hm… When I select Edit ? Annotate ? Background, I can select transparent.
Unfortunately, I’m currently not on Gentoo and couldn’t find out on the spot
how to get the compile options for my Arch-based ImageMagick.

--
Gruß | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

“The mating dance is a courtship ritual. You do it to woo and win.
I wooed. I won. I’m done.” – Earl Sinclair (Dinosaurs Ep. 2)
Re: imagemagick display image edit tool draws an opaque background [UPDATE] [ In reply to ]
Out of desperation, I've found out a workaround to this.  This
workaround suggests that it's a (introduced) bug in the program, because
I can't make out any logic to it.

im-display-eg-200913-1.png shows how the background is a not transparent
but a single color from the original background.  Note that the
"ellipse" tool was chosen, not the "fill-ellipse".

To get that image, I selected "image-edit -> draw... ->

  element -> ellipse

  color -> red

Normally, the color selects the color of the element.  This was new to
me that I got a white element when selecting red.  On other images, I
indeed get red.  But with the opaque "nonfill".  A "fill ellipse" would
have colored in the element with the selected color.

Anyway, im-display-eg-200913-2.png shows with I drew three ellipses,
changing only the color  The second ellipse, of a dark color, was indeed
transparent, showing the text underneath.  When I tried to change the
color to red again, I got the white square on the third ellipse.

I said this was a workaround, because by experimenting around, I could
get my red ellipse with transparent innerds and finish my project.  But
in preparing this report, I realized it's much more broken than I'd thought.


On 2020-08-30 22:02, n952162 wrote:
> In all of the imagemagick display installations I have, when I use the
> image edit draw function, it includes an opaque background, rather than
> just the lines themselves.  I've never had this with display(1) before,
> and can find nothing in the internet about it.  That suggests to me that
> it's - again - a use-flag issue.  Is there some use flag I have to use
> to have a colored line with a transparent background?
>
>
Re: imagemagick display image edit tool draws an opaque background [RESOLVED] [ In reply to ]
On 8/30/20 10:02 PM, n952162 wrote:
> In all of the imagemagick display installations I have, when I use the
> image edit draw function, it includes an opaque background, rather than
> just the lines themselves.  I've never had this with display(1) before,
> and can find nothing in the internet about it.  That suggests to me that
> it's - again - a use-flag issue.  Is there some use flag I have to use
> to have a colored line with a transparent background?
>

I finally figured this out.  In order to draw on images with display(1)
-> draw and have proper backgrounds, the /*-alpha on*/ option has to be
specified.