GIMP Chat
http://gimpchat.com/

pm_create_a_depthmap_image.py (Test)
http://gimpchat.com/viewtopic.php?f=9&t=19211
Page 1 of 1

Author:  Pocholo [ Thu Mar 04, 2021 9:08 pm ]
Post subject:  pm_create_a_depthmap_image.py (Test)

Hello guys! Can anyone with Linux test this plugin I just wrote. It creates a simple Depth map and It's working in Windows though.

Instructions
1. Open the image you want to work with.
2. Create a selection of the object you want to use for 3D
3. Run the plugin and Export the image as : example_depth.jpg
you need to use the "_depth" after the name and before the extension.


Image

Attachments:
pm_create_a_depthmap_image.zip [1.37 KiB]
Downloaded 119 times

Author:  racer-x [ Fri Mar 05, 2021 7:21 pm ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

I guess it works here in Linux. No idea what to do with the image created however......

Attachment:
test_depth.jpg
test_depth.jpg [ 156.32 KiB | Viewed 2061 times ]

Author:  leftyleo [ Sat Mar 13, 2021 6:13 pm ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

racer-x wrote:
I guess it works here in Linux. No idea what to do with the image created however......

Attachment:
test_depth.jpg


Racer:
I have Linux Mint. Are you using 2.8 or 2.10 ?
I seem to be having either errors or not appearing at all while using 2.8
Thank you

Author:  racer-x [ Sat Mar 13, 2021 7:12 pm ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

Running Linux Mint 20.1 and Gimp 2.10.22. Gimp 2.8 is very old, you really should move up to 2.10x.

Author:  rich2005 [ Sun Mar 14, 2021 4:41 am ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

@leftyleo

Not going to work with Gimp 2.8 - the parameters are set up for Gimp 2.10 syntax.

fails here:

  File "/media/rich/Data/gimp-2.8-port/plug-ins/pm_create_a_depthmap_image.py", line 46, in pm_create_a_depthmap_image
    grayLayer = pdb.gimp_layer_new(img, img.width, img.height, RGB, "Gray selection", 100, LAYER_MODE_NORMAL)
NameError: global name 'LAYER_MODE_NORMAL' is not defined


Not difficult to fix, however it does use the gmic plugin and the gmic plugin also has a very comprehensive depth map filter in the Stereoscopic 3D section.

Author:  leftyleo [ Sun Mar 14, 2021 7:03 am ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

Thank you all
I am on Mint 19.3 and just loaded up to GIMP 2.10 and gmic but still having problems..
I will go to an appropriate thread for that

This is a really interesting filter. I have some Halloween images i would try and bw/color with
the depth it might look kool
Similar to making a b/w image with only one object in color

Attachments:
File comment: black/white background with lily in color
lilly_pad_013_11.jpg
lilly_pad_013_11.jpg [ 319.53 KiB | Viewed 1938 times ]

Author:  leftyleo [ Sun Mar 14, 2021 9:06 am ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

rich2005 wrote:
@leftyleo

Not going to work with Gimp 2.8 - the parameters are set up for Gimp 2.10 syntax.

fails here:

  File "/media/rich/Data/gimp-2.8-port/plug-ins/pm_create_a_depthmap_image.py", line 46, in pm_create_a_depthmap_image
    grayLayer = pdb.gimp_layer_new(img, img.width, img.height, RGB, "Gray selection", 100, LAYER_MODE_NORMAL)
NameError: global name 'LAYER_MODE_NORMAL' is not defined


Not difficult to fix, however it does use the gmic plugin and the gmic plugin also has a very comprehensive depth map filter in the Stereoscopic 3D section.

-----
That is correct - I am in 2.10.14 now and i got Diego's A and B working just fine
but GIMP doesnt recognize this plug-in stored in the same folder path

Author:  rich2005 [ Sun Mar 14, 2021 9:24 am ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

Should work: This in my (k)ubuntu 18.04 (same as Mint 19) and Gimp 2.10.14

Attachment:
21014.jpg
21014.jpg [ 142.04 KiB | Viewed 1921 times ]


Usual suspects:
Is the plugin executable ?
Does gimp_gmic_qt work and is it updated ?

Author:  leftyleo [ Sun Mar 14, 2021 9:50 am ]
Post subject:  Re: pm_create_a_depthmap_image.py (Test)

rich2005 wrote:
Should work: This in my (k)ubuntu 18.04 (same as Mint 19) and Gimp 2.10.14

Attachment:
21014.jpg


Usual suspects:
Is the plugin executable ?
Does gimp_gmic_qt work and is it updated ?


[ face palm ] -- no exec flag
thank you for pointing out the obvious for me :yes

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/