Author Topic: How to make new image only containing Preview contents?  (Read 2193 times)

Offline brew

  • Newcomer
  • Posts: 47
I did this once before (perhaps a year ago), and now I can't remember what I did.

The goal is to create a preview on Img01, then create a new Image Img02 which the same size as Img01, with only the Preview data in it as a small box. The rest of Img02 is black.

I thought this was done with a script? I think I was making a mask to throw out a nebula area from a star mask or something like that. I thought at the time that this is a nice trick, but of course I have forgotten how to do it.

The Make Image menu item on the preview makes a new image of the preview, but it is the size of the preview, not the size of Img01.

Hopefully someone recognizes what I am trying to do and can tell me the simple trick :)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: How to make new image only containing Preview contents?
« Reply #1 on: 2015 June 29 15:04:38 »
you can create a new black image which is the same size as the original image. the easiest way to do this is to clone the image, then apply the pixelmath expression "0" (no quotes) to the image.

then use the SubstituteWithPreview script to copy the area defined in the preview on the original image; select the cloned image as the target. it will actually create a new image, so you can keep the black image around to use again with this method.

rob