PixInsight Forum (historical)

Software Development => New Scripts and Modules => Topic started by: Enzo De Bernardini on 2011 December 11 17:36:46

Title: ImageInsert Script
Post by: Enzo De Bernardini on 2011 December 11 17:36:46
Hi,

I wrote a little script that allows you to insert a small image in a bigger one, like this example:

Supernova SN 2011iv (http://astrosurf.com/astronosur/galeria/SN2011iv_20111207_1.htm)

The settings are simple: you select the images (big and small), location, margins, and optionally a border width and border color. Here a UI screen capture:

(http://astrosurf.com/astronosur/pixinsight/img/ImageInsertScript-1.png)

I am almost certain that there must be a more efficient way of doing that which I have used, but still it was fun. I used the classic way of crop and PixelMath (like the manual way), with a little math.

Enjoy ;)

Enzo.
Title: Re: ImageInsert Script
Post by: Alejandro Tombolini on 2011 December 11 18:20:48
Excelente!, funciona perfecto. Muchas gracias Enzo.

Saludos. Alejandro.
Title: Re: ImageInsert Script
Post by: Fco. Bosch on 2011 December 13 08:58:12
Thank you Enzo! Would be possible to selec the insertion area with the mouse, like a preview ... ?:sad:
Title: Re: ImageInsert Script
Post by: Enzo De Bernardini on 2011 December 13 09:59:36
Would be possible to selec the insertion area with the mouse, like a preview ... ?:sad:

I'm afraid that is beyond my current abilities :-[ But you can play with the predefined locations and margin values to locate the inset in, I think, any part of the main image (with some predefined maximum values for now) Anyway, can be tricky to locate at a specific point.

Enzo.
Title: Re: ImageInsert Script
Post by: oldwexi on 2011 December 13 11:33:02
Hi Fco.!
If you dont mind to insert "circular" images from one picture to the other
the process CloneStamp can be used the way you want with the mouse.

Here the description how i did it before Enzo announced his great tool.
(Thanks Enzo)

=======================================
Insert Images, or part of one, or more images to another one:
=======================================

R=Receiving Image
I=Inserted Image(s) (Usually out of one or more small images created out of preview(s)!!)



Part One:
---------
Make R active Image
Call Process CloneStamp
Press Reset on CloneStamp
Set Radius to I / 2  (use w or h  in bottom line of Window of I)

Part Two:
---------
Move Mouse to Center of I and Press Ctrl and left mouse,
Release Ctrl and left mouse,
move mouse to R and where you want the image I inserted,
Click left mouse,

You can repeat Part Two as often as you want (also with different I`s)

Click green execute on CloneStamp process window.
+
Close ConeStamp!!

Finished
or Start from Part One.

Aloha
Gerald
Title: Re: ImageInsert Script
Post by: Fco. Bosch on 2011 December 13 12:47:18
Thanks Gerald! I misuse clone stamp ...