Author Topic: How to mix overlay svg images from AnnotateImage  (Read 2338 times)

Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
How to mix overlay svg images from AnnotateImage
« on: 2017 November 12 11:33:36 »
Hi all!

I'm experimenting with the AnnotateImage script. As some labels are overlapping I choose to generate a svg overlay that later I edited in inkscape. But how I can put it together again?. It seems the svg consist only in alpha channel. I tried access this channel using [3] in pixelmath but without success.  Sure there is an easy solution...any help?

Thanks in advance,

sergio
Moonfish ED80 over a Meade LX200GPS 8"

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: How to mix overlay svg images from AnnotateImage
« Reply #1 on: 2017 November 12 15:21:05 »
After editing the SVG in Inkscape you can export the annotation to PNG. Then you can blend the PNG using PixelMath:
(1-annotation[3])*$T+annotation[3]*annotation.


Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
Re: How to mix overlay svg images from AnnotateImage
« Reply #2 on: 2017 November 13 00:19:02 »
After editing the SVG in Inkscape you can export the annotation to PNG. Then you can blend the PNG using PixelMath:
(1-annotation[3])*$T+annotation[3]*annotation.

Thanks Andres for answering but i got this error:
Code: [Select]
PixelMath: Processing view: NGC7331
Executing PixelMath expression: combined RGB/K channels: (1-annotation[3])*$T+annotation[3]*annotation: done
*** Error: Channel index out of range: annotation[3]
<* failed *>
Moonfish ED80 over a Meade LX200GPS 8"

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: How to mix overlay svg images from AnnotateImage
« Reply #3 on: 2017 November 13 01:07:25 »
Thanks Andres for answering but i got this error:
Code: [Select]
PixelMath: Processing view: NGC7331
Executing PixelMath expression: combined RGB/K channels: (1-annotation[3])*$T+annotation[3]*annotation: done
*** Error: Channel index out of range: annotation[3]
<* failed *>
The PNG must have alpha channel.

Offline Astrocava

  • PixInsight Addict
  • ***
  • Posts: 180
    • Astrocava.com
Re: How to mix overlay svg images from AnnotateImage
« Reply #4 on: 2017 November 13 02:06:39 »
Solved. As the overlay is greyscale (not RGB), I must use [1] when referring to alpha channel.

Thanks Andrés for the help and for this fantastic script.
Moonfish ED80 over a Meade LX200GPS 8"