It is currently 21 Jan 2018, 18:12

GIMP Scheme Fu ScriptsAuto Hatch Layers (Showcase | Slideshow)

Share your Scheme Fu scripts for GIMP here
Post Reply
User avatar
dinasset

Script Coder
View: Showcase | Slideshow
Topic Posts: 2/4
Posts: 711
Joined: 20 Jan 2017, 03:50
Cash on hand: 3,469.88 GLP
Gender: Guy
Location: Roma (Italy)
x 91
x 126
Italy

Auto Hatch Layers

Post#1 by dinasset » 19 Mar 2017, 02:52


Tim,
I was revisiting that very nice script of yours.
Two questions:
1-would you consider creating a python version?
2-could you check image ratio before establishing the working area? With rectangular images where width is much different from height the hatching does not fullfill the areas, look here:
example.jpg
example.jpg # (390.66 KiB) Viewed 354 times (Watermarked | Thumbnail)
0 x




Registered members enjoy ads-free content
User avatar
tim
Administrator
View: Showcase | Slideshow
Topic Posts: 2/4
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1106
x 240
Contact:
Canada

Post#2 by tim » 19 Mar 2017, 13:19


1) I haven't considered redoing it in python.
2) I think i double the working area before rotating... so unless the image is really rectangle it would work. With yours, you just might have to add blank space to your image and crop it after.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
dinasset

Script Coder
View: Showcase | Slideshow
Topic Posts: 2/4
Posts: 711
Joined: 20 Jan 2017, 03:50
Cash on hand: 3,469.88 GLP
Gender: Guy
Location: Roma (Italy)
x 91
x 126
Italy

Post#3 by dinasset » 19 Mar 2017, 22:44


tim wrote:
19 Mar 2017, 13:19
1) I haven't considered redoing it in python.
2) I think i double the working area before rotating... so unless the image is really rectangle it would work. With yours, you just might have to add blank space to your image and crop it after.
@1 : sorry...
@2 : I replaced the two statements where you fixed the 2 new dimensions to the double of the original ones with these:

Code: Select all

	  (if (> image-width image-height)
	    (begin
			(set! new-width (* image-width 2))
			(set! new-height (* image-width 2))
		)
		(begin
			(set! new-width (* image-height 2))
			(set! new-height (* image-height 2))
		)
	  )	

The fix works.
This is the result with my flat image:
example-after.jpg
example-after.jpg # (430.75 KiB) Viewed 320 times (Watermarked | Thumbnail)
0 x




User avatar
tim
Administrator
View: Showcase | Slideshow
Topic Posts: 2/4
Posts: 2071
Joined: 25 Sep 2016, 17:16
Cash on hand: 7,180.19 GLP
Bank: 42,250.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1106
x 240
Contact:
Canada

Post#4 by tim » 20 Mar 2017, 00:05


great.
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

User avatar gnerd (2), User avatar Pat625 (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Issabella
2: Issabella
3: Ella
4: dinasset
5: gnerd
6: tim
7: oldmangrumpy

Who is online

Users browsing this forum: No registered users and 2 guests