It is currently 25 Jan 2022, 12:01

• Featuring Members' Images •
Could be related to 'Playing Card Script for GIMP'
skinnyhouse
tim
gnerd
tim
tim

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Playing Card Script for GIMP

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger
1st Place
5775 Post(s)

Playing Card Script for GIMP

Post#1 by tim » 13 Jun 2018, 00:04


Playing Card Script banner/

This script will create a playing card (any card out of the deck) with your active layer/image.
playing_card.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/ folder) Tested in GIMP 2.10 only.
(2.98 KiB) Downloaded 389 times
playing_card(2).zip #
version 2. JOKER card added. JOKER card has no suit but suit is used to determine color (red/black)
(3.15 KiB) Downloaded 247 times
playing_card(3).zip #
version 3. GIMP 2.8 and GIMP 2.10 Compatible.
(3.15 KiB) Downloaded 223 times
playing_card(4).zip #
version 4. Added Finalize toggle which merges, resizes and drop shadow. (GIMP 2.8 & 2.10)
(3.35 KiB) Downloaded 209 times
playing_card(5).zip #
version 5. Allow "CUSTOM" card with custom text (GIMP 2.8 & 2.10)
(3.5 KiB) Downloaded 279 times
playing_card(6).zip #
version 6. Allow "Diagonal Symmetry Blend" option. (GIMP 2.8 & 2.10)
(3.77 KiB) Downloaded 276 times
playing_card(7).zip #
version 7. Solve blend bug in 2.10 by detecting gimp version and execute code for that version (GIMP 2.8 & 2.10)
(3.97 KiB) Downloaded 655 times
Script Menu Location: Python-Fu/Playing Card...

Script Options:
playing_card_script_options.jpg
playing_card_script_options.jpg # (30.84 KiB) Viewed 7404 times (Thumbnail | Recognize | Sq Tile | LNFI)
Instructions:
1. Open your image that you'd like to make a playing card out of.
2. (Optional but it'll make your card look nicer). Crop/Resize your image to have dimension of 688x1116. See How to select a rectangle are with a certain aspect ratio to select a rectangle with the same ratio as 688x1116 before you crop to selection to have a nicely prepared image before running script.
3. Run script ( Python-Fu/Playing Card...). Select your card value, select suit of card and select font. Click "OK".
4. That's it it'll create a playing card based on your settings.

Sample run:
playing_card_before_script.jpg
playing_card_before_script.jpg # (96.49 KiB) Viewed 7404 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_after_script.png
playing_card_after_script.png # (666.22 KiB) Viewed 7404 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_after_script_resized_and_added_drop_shadow.png
playing_card_after_script_resized_and_added_drop_shadow.png # (78.43 KiB) Viewed 7403 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_jokers_card_added.png
version 2 JOKER cards available
playing_card_jokers_card_added.png # (97.44 KiB) Viewed 7388 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_with_finalize_step.png
With finalize step applied in version 4 of script
playing_card_with_finalize_step.png # (89.83 KiB) Viewed 7288 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_custom.png
custom card
playing_card_custom.png # (97.83 KiB) Viewed 7276 times (Thumbnail | Recognize | Sq Tile | LNFI)
playing_card_diagonal_symmetry_blend.png
with Diagonal Symmetry Blend
playing_card_diagonal_symmetry_blend.png # (90.72 KiB) Viewed 7270 times (Thumbnail | Recognize | Sq Tile | LNFI)
Video of script usage:
aka Tin
World Food Program | Good Deeds Forum

         

Pat625
Tutorial Creator
2nd Place
4514 Post(s)

Post#2 by Pat625 » 13 Jun 2018, 04:07


Tin, I am not a great card player but I think this is a good script. I already have a few ideas for it. Thank you for all of the scripts that you have done. I really like them.

Pat625
Tutorial Creator
2nd Place
4514 Post(s)

Post#3 by Pat625 » 13 Jun 2018, 04:30


Tin I just tried to use the script in 2.8 and 2.10 and could not get it to work. Kept getting this error:

ack (most recent call last):
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 736, in response
dialog.res = run_script(params)
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script
return apply(function, params)
File "C:\Users\patpo\.gimp-2.8\Plug-ins 3 (Tin Tran)\playing_card.py", line 101, in python_playing_card_tt
new_layer = pdb.gimp_layer_new(new_image,card_width,card_height,RGBA_IMAGE,"card back",100,LAYER_MODE_NORMAL_LEGACY)
NameError: global name 'LAYER_MODE_NORMAL_LEGACY' is not defined

tim
GL Blogger
1st Place
5775 Post(s)

Post#4 by tim » 13 Jun 2018, 06:07


Pat, please give version 3 of script a go.
It's 2.8 and 2.10 compatible
Not sure why you can't run previous versions in 2.10 since i tested those in 2.10.
playing_card_2.8_2.10_Compatible.png
playing_card_2.8_2.10_Compatible.png # (69.87 KiB) Viewed 7329 times (Thumbnail | Recognize | Sq Tile | LNFI)
aka Tin
World Food Program | Good Deeds Forum

         

tim
GL Blogger
1st Place
5775 Post(s)

Post#5 by tim » 13 Jun 2018, 12:58


Version 4 uploaded which has finalize step (toggle) which merges, resizes and drops shadow.
aka Tin
World Food Program | Good Deeds Forum

         

tim
GL Blogger
1st Place
5775 Post(s)

Post#6 by tim » 13 Jun 2018, 14:15


playing_card_trump_card.png
playing_card_trump_card.png # (100.08 KiB) Viewed 7275 times (Thumbnail | Recognize | Sq Tile | LNFI)
aka Tin
World Food Program | Good Deeds Forum

         

Pat625
Tutorial Creator
2nd Place
4514 Post(s)

Post#7 by Pat625 » 13 Jun 2018, 14:55


Thank you very much, Tin for fixing my problem, whatever it was. I am able to use Version 5 in both 2.8 and 2.10. This is a very nice script. Lot of fun. I think I'll make a deck of cards with my grandchildren's pictures. But first, some play.
Tin Tran_Playing Card.Tigger.2.8.jpg
Tin Tran_Playing Card.Tigger.2.8.jpg # (53.97 KiB) Viewed 7274 times (Thumbnail | Recognize | Sq Tile | LNFI)
Tin Tran_Playing Card.Lion Cub 2.10.jpg
Tin Tran_Playing Card.Lion Cub 2.10.jpg # (81.44 KiB) Viewed 7274 times (Thumbnail | Recognize | Sq Tile | LNFI)

tim
GL Blogger
1st Place
5775 Post(s)

Post#8 by tim » 13 Jun 2018, 15:27


Thanks for trying out the script Pat. results looking good.
aka Tin
World Food Program | Good Deeds Forum

         

Ella
Tutorial Creator
8th Place
1738 Post(s)

Post#9 by Ella » 13 Jun 2018, 20:01


Used the Queen of hearts from Alice in Wonderland and King Louie from Jungle Book.
Also gave it a personal touch :)
Attachments
disney.characters.png
disney.characters.png # (1.24 MiB) Viewed 7249 times (Thumbnail | Recognize | Sq Tile | LNFI)
Ella's gallery My Blender work - Ella
My Blog - Le temps perdu


There is a crack in everything. That's how the light gets in.
(Leonard Cohen)

tim
GL Blogger
1st Place
5775 Post(s)

Post#10 by tim » 13 Jun 2018, 20:43


Very nice work....especially the personalized touch.
aka Tin
World Food Program | Good Deeds Forum

         


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 11 guests