It is currently Mon Jul 22, 2024 8:40 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: a little "divertissement"
PostPosted: Fri May 04, 2018 11:55 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Walking around internet, I found something about the effect "Picture in Picture".
Very easy to do manually, but for lazy people like me, I prepared this "extra-small" filter, to play with.


Attachments:
Picture_In_Picture.7z [560 Bytes]
Downloaded 94 times
PiP-rose.jpg
PiP-rose.jpg [ 147.78 KiB | Viewed 2558 times ]

_________________
"Where am I ?"
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: a little "divertissement"
PostPosted: Fri May 04, 2018 12:20 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
Much joy with this funny filter, Dinasset. I did some tries. :) :tyspin
Really funny


Attachments:
1920-49473_DN_Picture in Picture.jpg
1920-49473_DN_Picture in Picture.jpg [ 126.33 KiB | Viewed 2542 times ]
grey-crowned-crane-3057840_DN_PictureInPicure.jpg
grey-crowned-crane-3057840_DN_PictureInPicure.jpg [ 108.07 KiB | Viewed 2544 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Last edited by Issabella on Fri May 04, 2018 12:25 pm, edited 1 time in total.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Fri May 04, 2018 12:22 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Wow !
Very "creative" use, I like them a lot.

_________________
"Where am I ?"


Top
 Post subject: Re: a little "divertissement"
PostPosted: Fri May 04, 2018 12:26 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
:hi5 Thank you so much. I'll think of some other use for this nice filter.

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sat May 05, 2018 1:27 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
I ran the filter twice to get the small size in "another drawing style" and added it to the original picture result. :)


Attachments:
ramsau-2438402_DN_Another drawing_Picture In Picture.jpg
ramsau-2438402_DN_Another drawing_Picture In Picture.jpg [ 235.38 KiB | Viewed 2485 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Sat May 05, 2018 5:11 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Very interesting and nice result.
You master even this extra-small filter, and discover creative uses of its outcome.
Thanks a lot.

_________________
"Where am I ?"


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sat May 05, 2018 6:08 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7316
Location: Göteborg at last!
Like toast, sometimes the simplest thing is just what you need. Nice images both of you. :)


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 11:52 am  (#8) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Dinasset: Playing with your picture in picture script and it is a delight. Thank you so much. If you ever expand it, the choice of adding a second or 3rd picture would be wonderful. I see that Issabella has done that manually. Am I getting lazy?

Thanks again for this script!

Attachment:
Diego.Pic in Pic.Wolves.Gimp 2.10.jpg
Diego.Pic in Pic.Wolves.Gimp 2.10.jpg [ 427.04 KiB | Viewed 2430 times ]


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 2:27 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks, Pat.
Only added the possibility to have a different picture in picture.
(I like to keep the filter really simple).
Now the filter:
- checks whether there is a layer below the input Drawable:
-- if so the input drawable is scaled down, the layer below is blurred
-- if not the input drawable is copied and scaled down, then the original drawable is blurred
(pls note: other layers are ignored)

#!/usr/bin/env python

from gimpfu import *

def picture_in_picture (inImage, inDrawable, smallsize) :
   
    # check whether there is a layer below inDrawable:
    # - if so the inDrawable is scaled down, the layer below is blurred
    # - if not the inDrawable is copied and scaled down, then the original inDrawable is blurred
    # pls note: other layers are ignored
   
    swidth = inImage.width*smallsize/100
    sheight = inImage.height*smallsize/100
    Layers=[]
    (NL, Layers) = pdb.gimp_image_get_layers (inImage)
    if len(inImage.layers)==1:
        Small = inDrawable.copy()
        inImage.add_layer (Small, 0)
        pdb.gimp_layer_add_alpha (Small)
        pdb.gimp_layer_scale (Small, swidth, sheight, True)
        pdb.plug_in_gauss_iir (inImage, inDrawable, 7, True, True)
    else:
        Layers = inImage.layers
        pdb.gimp_layer_add_alpha (Layers[0])
        pdb.gimp_layer_scale (Layers[0], swidth, sheight, True)
        pdb.plug_in_gauss_iir (inImage, Layers[1], 7, True, True)
    return ()

register(
        "picture_in_picture", "picture_in_picture", "picture_in_picture",
        "anydody", "anybody", "2018",
        "picture_in_picture",
        "RGB*",
        [
                (PF_IMAGE, "image", "Input image", None),
                (PF_DRAWABLE, "drawable", "Input drawable", None),
                (PF_ADJUSTMENT, "smalls", "Small size (%)", 25, (10, 50, 1)),
        ],
        [],
        picture_in_picture,
        menu="<Image>/Test"
        )

main()


Example:
Attachment:
2pictures.jpg
2pictures.jpg [ 109 KiB | Viewed 2423 times ]


(note: the foreground has been moved manually, to be more "significant")

if you want to download the zipped file, here it is:
Attachment:
Picture_In_Picture.7z [753 Bytes]
Downloaded 99 times

_________________
"Where am I ?"


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 3:19 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
Thank you so much Dinasset. I'm sure that Pat has something nice in mind to do with this filter. :)
I did a first test.


Attachments:
back-view-blonde-hair-blur-547557_DN_Picture in picture.jpg
back-view-blonde-hair-blur-547557_DN_Picture in picture.jpg [ 105.64 KiB | Viewed 2418 times ]
back-view-blonde-hair-blur-547557_DN_Picture in picture+Structure.jpg
back-view-blonde-hair-blur-547557_DN_Picture in picture+Structure.jpg [ 1.4 MiB | Viewed 2418 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 4:01 pm  (#11) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
These I did manually before you replied to my post and I didn't know about it! Today, I am doing several things at once. :gaah
Attachment:
Diego.Pic in Pic.Friends.Gimp 2.10.jpg
Diego.Pic in Pic.Friends.Gimp 2.10.jpg [ 395.19 KiB | Viewed 1140 times ]

Attachment:
Diego.2.10.Pic in Pic.Cars Over The Years.jpg
Diego.2.10.Pic in Pic.Cars Over The Years.jpg [ 283.33 KiB | Viewed 1140 times ]


I just downloaded and installed your new version. Will try it out now if no interruptions.


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 4:34 pm  (#12) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Dinasset: I really love this one! It worked perfectly. Thank you so much.
Attachment:
Diego.Pic in Pic.Ver.2.Little Angel..Gimp 2.10.jpg
Diego.Pic in Pic.Ver.2.Little Angel..Gimp 2.10.jpg [ 151.29 KiB | Viewed 1139 times ]


Top
 Post subject: Re: a little "divertissement"
PostPosted: Sun May 06, 2018 10:48 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks Issa and Pat.
A "micro"- filter.
Just for fun...

_________________
"Where am I ?"


Top
 Post subject: Re: a little "divertissement"
PostPosted: Mon May 07, 2018 1:47 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
Thanks Erisian for your comment to our plays. :)
Nice results, Pat. :)
I played this nice filter today morning.


Attachments:
file000501562383_DN_Pic in Pic.jpg
file000501562383_DN_Pic in Pic.jpg [ 682.31 KiB | Viewed 1130 times ]
background-beach-DN_Pic-in-Pic.jpg
background-beach-DN_Pic-in-Pic.jpg [ 158.72 KiB | Viewed 1130 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Mon May 07, 2018 2:19 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Like Erisian said: "Like toast, sometimes the simplest thing is just what you need."
It seems to be an appreciated toy...
Thanks Issa. Nice uses.

_________________
"Where am I ?"


Top
 Post subject: Re: a little "divertissement"
PostPosted: Mon May 07, 2018 4:46 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
A nice toy, Thanks Dinasset.


Attachments:
fondo-de-caballos-DN_PictureInPicture.jpg
fondo-de-caballos-DN_PictureInPicture.jpg [ 133.72 KiB | Viewed 1126 times ]
adult-art-artistic_DN_Picture in Picture.JPG
adult-art-artistic_DN_Picture in Picture.JPG [ 212.87 KiB | Viewed 1126 times ]
adorable-cat_DN_Picture in Picture.jpg
adorable-cat_DN_Picture in Picture.jpg [ 112.88 KiB | Viewed 1126 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Mon May 07, 2018 10:49 pm  (#17) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Very nice, Issabella. I played a little it today too.
Attachment:
Diego.Pic in Pic.Gimp 2.10.Contrast.jpg
Diego.Pic in Pic.Gimp 2.10.Contrast.jpg [ 379.26 KiB | Viewed 1116 times ]

Attachment:
Diego.Pic in Pic.Gimp 2.10.Girl Walking Dark Forest.jpg
Diego.Pic in Pic.Gimp 2.10.Girl Walking Dark Forest.jpg [ 266.82 KiB | Viewed 1116 times ]


Top
 Post subject: Re: a little "divertissement"
PostPosted: Tue May 08, 2018 8:10 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
Pat, I like your results a lot. :yes

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.


Top
 Post subject: Re: a little "divertissement"
PostPosted: Wed May 09, 2018 2:32 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 12724
Location: Spain, Aragón
In this sample, I ran the filter four times at different % sizes and copilled the results rotating them a bit.
The same action can be done with different pictures and the result is very nice, too. :)


Attachments:
flowers-bouquet_DN_PictureInPicture.JPG
flowers-bouquet_DN_PictureInPicture.JPG [ 448.48 KiB | Viewed 1104 times ]

_________________
Image

Gimp 2.10.30(samj) portable _ OS Windows 10 Home_ 64bits
Don’t be afraid to start over. It’s a new chance to rebuild what you want.
Top
 Post subject: Re: a little "divertissement"
PostPosted: Wed May 09, 2018 2:48 am  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Wow, I like these experiments !

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group