It is currently Fri Jul 19, 2024 6:24 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 2:09 pm  (#1) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
Wanted a super quick way of insetting a snapshot of the original image before it goes through the filter chain. So here's the filter for just that, you just drag PiP into composer wire the output of the filters to it and you get this..

Attachment:
PiP1.png
PiP1.png [ 214.87 KiB | Viewed 3098 times ]


I've written it as a utility filter but it does have sliders so if you want to get creative with it and post the results be my guest! It honours transparency from the input images and you can scale the inset to be larger than the original if you want so have fun. Just as a lame example..

Attachment:
PiP2.png
PiP2.png [ 178.69 KiB | Viewed 3098 times ]


CODE:

#Picture In Picture V0.0
#Written by step7 (2012)
#Insets a positionable, scalable 2nd image within a main image
#
#Wiring:
#in1 - Primary image
#in2 - Secondary image to be inset into primary image
#
#User Values:
#PiP_x, PiP_y - position inset image
#PiP_scale - Main image is scaled down by this factor
#when producing the inset (have fun with scaling <1)
#PiP_opacity - Sets the inset opacity
#
#
#Contact me about the filter on Gimp Chat Forum or Mathmap Google Group
#
filter PiP(image in1, image in2, float PiP_x:-1-1 (0.6), float PiP_y:-1-1 (-0.6),float PiP_scale:0-16 (3.5),float PiP_opacity:0-1 (1))
qq=in2(xy:[(x-PiP_x)*PiP_scale,(y-PiP_y)*PiP_scale]);alp=alpha(qq)*PiP_opacity;in1(xy)*(1-alp)+qq*alp end


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 2:27 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
Thanks step7. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 2:53 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
You've taken a real fancy for MathMap.
Nice script, how about a transform option or put the inset on a separate layer so it could be freely manipulated in MathMap?

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 4:46 pm  (#4) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
LOL yeah stuck on Mathmap, it'll wear off when I've exhausted all the possibilities, you'll be running Gimp 32.8 by then ;)

What transform options would you like?
Bear in mind transforms can be applied to the inset image before its passed to PiP.

Not sure what you mean by "put the inset on a separate layer" - please elaborate (I'm a bit slow and you may have to resort to drawing pictures). The filter has two inputs so both the main and inset images can be sourced from separate Gimp layers if that's what you mean.

I'll post some more examples shortly to elaborate. Meantime please keep any suggestions coming.


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 6:14 pm  (#5) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
OK an example using an image from a Gimp layer and applying a rotate transform prior to PiP in composer. (Notice the transparency on the inset).

Attachment:
example.png
example.png [ 211.24 KiB | Viewed 3033 times ]


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 7:27 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Step 7 a remarkable filter considering your short learning curve, Mathmap is a plugin well worth keeping in Gimp. :yes

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Mon Jun 25, 2012 11:54 pm  (#7) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Quote:
What transform options would you like?
Bear in mind transforms can be applied to the inset image before its passed to PiP.

This would be the bomb.
When you activate your expression you have an inset picture you can totally manipulate independently of the original image. Like now you can x y, opacity and scale, why not add a transform option for the inset? The transform would be some type of rotation.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Picture In Picture Filter for Mathmap
PostPosted: Tue Jun 26, 2012 8:54 am  (#8) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
i think may be added using it (with the composer )

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) A picture says it all.

4

No new posts Attachment(s) how to place text exactly into the picture - is there any help?

8

No new posts WebP picture for the attachment

1

No new posts Attachment(s) Feather in gimp gives unwanted lines in picture - SOLVED

9

No new posts I made a new MathMap filter

21



* Login  



Powered by phpBB3 © phpBB Group