• Content Count

  • Joined

  • Last visited

  • Days Won


Reptillian last won the day on May 15 2019

Reptillian had the most liked content!

Community Reputation


Recent Profile Visitors

1,297 profile views
  1. I don't know where to post this, so I"ll leave this here
  2. To be fair, it is impossible or difficult to get some FOSS projects to work with visual studio. I heard that there's quirks with compiling, but can't confirm. There's other solutions if anon does not want to use Visual Studio. I actually code with KDE Kate editor myself. Not completely great with generic language like c++, but very easy with scripting languages.
  3. The rectangle square fill still has bugs. But for now, I decided to step back, so that I can work on Krita.
  4. @IHaveNoName The distance is wrong. I know that's not helping. What would help in this case is a plugin that does the following: 1) Finds the minimum x where alpha is greater than 0, maximum x where alpha is, minimum y where alpha is greater than 0, where maximum y is greater than 0. 2) Use that info to find where to place image relative to the center of canvas. 3) Finally translate the image using distance and angle. This involves the usage of sin and cos and radian. Fragment Blur use some of that.
  5. Can't help, but felt like commenting on this even though I don't use codelab. I'm actually impressed at how far codelab went.
  6. Alright, another attempt. Using this test code for code[local] or code[global] filter in g'mic-qt plugin. repeat $! l[$>] to_rgb rgb2hsv channels 0 tones 2 k. erode 5 dilate 5 +area_fg 0,0 f. i>ia?0:i store. area +gradient2rgb , +f. i>0 compose_channels. + f. i>0 negate. inpaint_pde.. . rm. rv +blend shapemedian0 blend[^-1] shapeaverage0 blend average n. 0,255 rgb2hsl sh. 1 f. i>0?1 rm. hsl2rgb $area n. 0,360 +f. i0#1>0?1 . a[^0] c hsv2rgb. blend interpolation,.5 endl done Can't say I have been successful though. It's a difficult problem. The code use gradient angle and find the angle of each shape. I don't what to do on the area part, but it converts area into hsv format. Then I blended them to filter out the shape. Perhaps, I think I should do more work here. It does look promising I must admit. The next step is to try to do multiple variable to filter out shapes by if else statements. It is possible to do thinning here too. I'll find out what to do.
  7. Could you PM me the original shape image uncompressed, I believe I thought of a theoretical solution using coding and I want to code it. For anyone else reading this, I believe two for loops (current pixel, and relative pixel) and comparison should solve this.
  8. I really want to rewatch Luther again. The dynamics are interesting as well as the depth of that show.
  9. I was expecting the problem to be something like that rather than layer-by-layer shape selection. Right now, what @Red ochre is your best route for this issue. Theoretically, someone could write up a plugin that converts shapes based on searching pixels by pixels, and if it found, then that area is colored. I have pictured it in my head, and it seems do-able. It's comparison by pixels through pixels, so doable in principle. If they're of different areas, theoretically object size filtering would solve your problem, or it becomes closer to the solution. @MJW has written a plugin just for this, but it doesn't address colored background. I have written that for G'MIC, but you'd need to reduce the number of color in say that image. Either do some processing to filter out the colors, and then use @MJW plugin or reduce number of colors and use Object Size Filtering under G'MIC QT. I have attempted it, well, I guess then theory doesn't really work out, and manual solution seem to be the fastest.
  10. It been a while since I have been into this thread, but now I got something thanks to @Creed31 that indirectly gave me the idea. New Filter - Rectangle-Square Fill I will be finishing up the image mapping version of tomorrow or two, and immediately push it by then.
  11. Right now that is a temporary solution until @Rick Brewster fixes it. So, I believe you should turn it off. That being said, that is very wacky, but there is interesting generated stuff from the bug.
  12. I have recently solved my issue (mostly). Both with converting rectilnear shapes into several different shapes, and inserting rectangle. For converting rectinear into several different shape. It seems that this can do with a small vector as a reference for the larger image. It doesn't work 100%, but it can convert a lot of rectilinear shape into several rectangles in context of vectors. to_gray n 0,1 f " topleft=i(x-1,y-1); topmiddle=i(x,y-1); topright=i(x+1,y-1); middleleft=i(x-1,y); middle=i; middleright=i(x+1,y); bottomleft=i(x-1,y+1); bottommiddle=i(x,y+1) bottomright=i(x+1,y+1); F=i; if(i, if( ( (middleleft&&topmiddle&&middleright) ||(bottommiddle&&middleleft&&topmiddle) ||(middleleft&&bottommiddle&&middleright) ||(bottommiddle&&middleright&&topmiddle) ) || ( (bottommiddle&&bottomright&&middleright) ||(topmiddle&&topright&&middleright) ||(topmiddle&&topleft&&middleleft) ||(bottommiddle&&bottomleft&&middleleft) ) ,F++; ); ); F; " Here's the code for generating "grid" of rectangle and squares. #@cli rep_rand_sqrrectex: eq. to 'rep_random_square_rectangle_texture' : (+) rep_rand_sqrrectex: rep_random_square_rectangle_texture $* #@cli rep_random_square_rectangle_texture: square_dimension,_rectangle_max_length_1,_rectangle_length_2,_frequency_of_rectangle,_erode,_output={ 0=none | 1=filled_gray | 2=filled_line | 3=labeled_filled_line },_seed #@cli : Create a texture with aligned rectangle and squares. #@cli : (eq. to 'rep_rand_sqrrectex') #@cli : Default values: '_rectangle_max_length=1','_rectangle_max_length=2','_frequency_of_rectangle=1','_erode=0','_output=2','_seed=' #@cli : Author: Reptorian. #@cli : $ rep_random_square_rectangle_texture 20,3,3,2,,0 rep_random_square_rectangle_texture: skip ${2=2},${3=1},${4=1},${5=0},${6=2},${7=} if narg($7) srand $7 fi square_size=$1 if $6 square_size+=$6 fi if $1<2 error ""$"1>1==F" fi mw=${-max_w} mh=${-max_h} nvw={ceil($mw/$square_size)} nvh={ceil($mh/$square_size)} $nvw,$nvh,1,1,"x+y*w" if abs(round($2))==1&&abs(round($3))==1 error ""$"2>1||"$"3>1==F" fi msize={sqrt(sqr(round($2)))+sqr(round(abs($3)))} if $1<2 error ""$"2>1==F" fi freq={int(avg(1/$msize,$4,.5)*(iM+1))} val={iM+1} repeat round($freq) orientation={round(u(0,1))} nsl_1={round(u(1,abs($2)))} nsl_2={round(u(1,abs($3)))} min_nsl={min($nsl_1,$nsl_2)} max_nsl={max($nsl_1,$nsl_2)} if $min_nsl==1&&$max_nsl==1 max_nsl={round(u(2,abs(max($2,$3))))} fi px={round(u(0,w#-1-1))} py={round(u(0,h#-1-1))} if $orientation $min_nsl,$max_nsl,1,1,$val j.. .,$px,$py rm. else $max_nsl,$min_nsl,1,1,$val j.. .,$px,$py rm. fi val+=1 done label. 0,0 if $6 {$nvw*$square_size+1},{$nvh*$square_size+1},1,1,i(#-1,floor(x/$square_size),floor(y/$square_size)) rm.. if $6>1 f. "(x!=0&&x!=w-1&&y!=0&&y!=h-1)?(i(x-1,y-1,z,c,0,1)==i(x,y))*((i(x-1,y,z,c,0,1)==i(x,y))&&(i(x,y-1,z,c,0,1)==i(x,y))):0" if $5 erode. $5 expand_xy. {int($5/2)},0 if !($5%2) r. {w#1-1},{h#-1-1} fi fi fi if $6>2 label_fg. 0,0 fi fi I'll be integrating these two. But, I hope this helps future PDN plugins developers. There might be needing more work, but those work well most of the time.
  13. "Vector graphics are computer graphics images that are defined in terms of 2D points, which are connected by lines and curves to form polygons and other shapes." Raster graphic image processing applications has zero concept of polygon or line. You can't select shapes that way.