It is currently Thu Aug 20, 2026 11:38 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Sat Aug 20, 2022 2:01 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Mar 01, 2014
Posts: 14137
Location: Spain, Aragón
Thank you so much, cli345. It works great with the new option. And perfect in default, too. :tyspin

_________________
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: New G'MIC filter "Frame [Relief]"
PostPosted: Sat Aug 20, 2022 6:34 am  (#22) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 5019
Location: Sydney Australia
Hi cli345 - thanks, I just installed and tried out your new GMIC filter; added some bevels on the frame for effect.


Attachments:
frame_relief.png
frame_relief.png [ 1.29 MiB | Viewed 2247 times ]

_________________
Image

Respect should be offered freely but hard earned
Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Sat Aug 20, 2022 7:11 am  (#23) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 859
Location: SEA - South East Asia
That's absolutely great cli345, IMO your filter should become officially published in G'MIC now :clap
Thank you :tyspin
Attachment:
screenshot_20220820-200617.png
screenshot_20220820-200617.png [ 776.98 KiB | Viewed 2240 times ]

_________________
Patrice


Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Sun Aug 21, 2022 1:56 pm  (#24) 
Offline
GimpChat Member

Joined: Oct 16, 2017
Posts: 45
Hi, I could push it soon, but I'm here to notify you that I left some criticisms on the filter itself with some suggestions based from what I read. Waiting on the followup to this.


Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Tue Aug 23, 2022 1:19 pm  (#25) 
Offline
GimpChat Member

Joined: Oct 16, 2017
Posts: 45
As some days had passed awaiting response, I merged. It is about to be or now on G'MIC.


Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Wed Aug 24, 2022 3:00 am  (#26) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2613
Yes, it is there when the filters are refreshed.

Only one comment, setting a colour with the sliders is somewhat serendipitous ;)

If a red base colour required the sliders do not relate to the usual Gimp systems.

Attachment:
frame-relief.jpg
frame-relief.jpg [ 119.03 KiB | Viewed 2177 times ]


Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Fri Aug 26, 2022 10:50 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 859
Location: SEA - South East Asia
Just discovered, (@cli346 I don't mind at all, it's just to let you know :hehe )
1. If there is some transparencies on an image the transparent area will be black, and the edge between the opaque and now the black will be pixelated.
2. If you just removed (Select>delete), a portion of an image then it will not be taken in count
With the now official filter (after refreshing filters in G'MIC and removed the .gmic in /home/patrice)

1. black BG and pixelated edges
Image

2. Filter don't "see" the hole in a middle
Image

_________________
Patrice


Top
 Post subject: Re: New G'MIC filter "Frame [Relief]"
PostPosted: Mon Aug 29, 2022 11:42 am  (#28) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hello! :)
Thanks Reptorian, PixLab, Issabella, oldmangrumpy, rich2005 for your valuable feedback! :tyspin

@Reptorian and PixLab
I don't understand well what you want to do with tranparency. I thought that, most often, people would want to add a frame to a final image. So, I'm not motivated to do anything about that.

@rich2005
I propose adding a possibility to set a uniform color onto the frame.
Here is the modified code:
#@gui ____<b>Frames</b>
#------------------
#@gui Frame [Relief] (prerelease): cl_reliefFrame_prerelease, cl_reliefFrame_prerelease(1)
#@gui : note = note("<b>Frame Limit:</b>")
#@gui : Type = choice(2, "Outset", "Inset", "Groove", "Ridge")
#@gui : Size = float(10,6,40)
#@gui : Relief Width = float(1.5,0,10)
#@gui : Relief Amount = float(75,0,127)
#@gui : sep = separator()
#@gui : note = note("<b>Frame Area:</b>")
#@gui : Kaleidoscope Effect = bool(1)
#@gui : Frame Blur = float(60,5,80)
#@gui : Frame Hue Change = float(0,-180,180)
#@gui : Frame Saturation Change = float(0,-1,1)
#@gui : Frame Luminosity Change = float(0,-0.5,0.5)
#@gui : sep = separator()
#@gui : note = note("<b>Uniform Frame Color:</b>")
#@gui : note = note("<small>This overrides "Frame Area" section.</small>")
#@gui : Set Uniform Frame Color = bool(0)
#@gui : Frame Color = color(192,192,192)
#@gui : sep = separator()
#@gui : note = note("<b>Graininess:</b>")
#@gui : Graininess Type = choice("Gaussian", "Uniform", "Poisson")
#@gui : Graininess Amount = float(0,0,80)
#@gui : Graininess on = choice("Frame", "Picture", "Both")
#@gui : sep = separator()
#@gui : url = link("Filter discussed here","http://gimpchat.com/viewtopic.php?f=28&t=20005#p274661")
#@gui : note = note("<small>Author: <i>Claude Lion</i>. Latest Update: <i>2022/08/26</i>.</small>")
#@gui : note = note("<small>It uses filters of David Tschumperlé and an algorithm of Reptorian.</small>")

cl_reliefFrame_prerelease:

   frameType,frameSize,reliefWidth,reliefAmount,kaleido,frameBlur,frameHue,frameSat,frameLum,unifColor,colorR,colorG,colorB,grainType,grainAmount,grainFrameOn=$*

   if $grainType==2
      grainType=3
   fi

   foreach {
      remove_opacity.

      [-1]
      
      if $unifColor==0
         if $kaleido
            fx_kaleidoscope. 50,50,0,0,100,10,2
         fi
         b. $frameBlur

         l.
            rgb2hsl split c
            +. $frameLum c. 0,1
            +.. $frameSat c.. 0,1
            +... $frameHue %... 360
            a c hsl2rgb
         done
      elif $unifColor==1
         fill. [$colorR,$colorG,$colorB]
      fi

      if $grainFrameOn==0
         fx_noise. $grainAmount,$grainType,16,1,0,50,50
      elif $grainFrameOn==1
         fx_noise.. $grainAmount,$grainType,16,1,0,50,50
      fi

      100%,100%,1,1,0
      fx_frame_round. $frameSize,20,1,255,255,255,255,0,0,3
      remove_opacity.
      n. 0,255

      [-1]

      if $frameType>=1 # inset, groove, ridge
         negate.
      fi

      if $frameType>=2 # groove, ridge
         gradient_norm.
      fi

      if $frameType==3 # ridge
         negate.
      fi

      fx_smooth_antialias. 100,10,5,0,50,50
      
      negate.



      l.
         # inspired by emboss_image of Reptorian
         b. $reliefWidth
         fill. if(abs(i)<1e-10,0,i) # to work around https://github.com/dtschump/gmic/issues/402
         gradient2rgb. 0 n. 0,255
         [-1]
         rgb2hsv[-2,-1] split[-2,-1] c

         l[-3--1] +[-3] {315} %[-3] 360 done
         l[-6--4] +[-3] {135} %[-3] 360 done
         l[-3--1] a c hsv2rgb s c done
         l[-6--4] a c hsv2rgb s c done
         rm[^-6,-3]
         negate..
         / 2
         +. 128
         blend grainmerge,1
      done
      to_rgb.

      apply_curve. 1,0,{127-$reliefAmount},255,{128+$reliefAmount}

      fill[0] i#2*i#1+(255-i#2)*i n[0] 0,255
      rm.. rm..

      blend grainmerge,1
      if $grainFrameOn==2
         fx_noise. $grainAmount,$grainType,16,1,0,50,50
      fi
   }

Users will have to reset parameters to default values.

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group