Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 1,378
» Latest member: docrob
» Forum threads: 2,080
» Forum posts: 11,376

Full Statistics

Latest Threads
Sharpening text in a jpg ...
Forum: Gimp 2.8 questions
Last Post: PAL Thai
27 minutes ago
» Replies: 2
» Views: 60
How much size upscale or ...
Forum: General questions
Last Post: Tetragram
1 hour ago
» Replies: 3
» Views: 103
scripts suddenly stopped ...
Forum: Gimp 2.8 questions
Last Post: rich2005
2 hours ago
» Replies: 10
» Views: 172
GIMP RAW Colour Managemen...
Forum: General questions
Last Post: Ofnuts
2 hours ago
» Replies: 1
» Views: 25
Paint by Number
Forum: General questions
Last Post: Blighty
5 hours ago
» Replies: 1
» Views: 90
Python-fu plugin UI
Forum: Extending the GIMP
Last Post: Ofnuts
Yesterday, 11:21 PM
» Replies: 3
» Views: 43
Python-fu path of the plu...
Forum: Scripting questions
Last Post: Davide_sd
Yesterday, 09:40 PM
» Replies: 3
» Views: 84
Gimp Python-fu 2.7 to lau...
Forum: Extending the GIMP
Last Post: Ofnuts
Yesterday, 09:11 PM
» Replies: 7
» Views: 297
Divide circular ring to x...
Forum: General questions
Last Post: rich2005
Yesterday, 06:38 PM
» Replies: 3
» Views: 102
kind of paintbrush group ...
Forum: General questions
Last Post: denzjos
Yesterday, 04:12 PM
» Replies: 2
» Views: 98

 
  Gimp, python, and numpy
Posted by: Ofnuts - 12-04-2017, 09:52 PM - Forum: Extending the GIMP - Replies (28)

Numpy is one of the things that makes Python an "in" language according to this StackOverflow blog. But it can also be used outside of data science. In practice it is a very efficient vector/matrix library and so is well suited to process image data.

Together with the ability to extract "pixel regions" with the Gimp python API, some pretty fast processing can be written quickly. See attached script for some exemples: median/average filter (the median filter is almost twice as fast as the one in GMIC), and an implementation of Color>Desaturate>Luminosity. If done properly, there are no loops in Python, all the pixel iteration is done by the numpy code on native data.

Of course, you have to add the numpy module to the python runtime used by Gimp. Very easily done in Linux... it could be more complicated to do on Windows/OSX, but not impossible.

Edit: updated the script 2017-12-05 (now uses 2D rectangular color planes instead of single vector ones)



Attached Files
.zip   numpyops.zip (Size: 1.23 KB / Downloads: 105)
Print this item

  Faster Way to Clean Background in Photo / Vector Image?
Posted by: TechnicGeek - 12-04-2017, 03:50 PM - Forum: General questions - Replies (12)

Hello,

Often I need to remove background from photo/raster or vector. I wanted to know what is the most efficient way to do that. Here's how I do it if it's photo:

1. Use Rectangle Select or Ellipse Select to select areas around object to remove first.
2. Use Eraser to remove small areas of background until all around object is clean.

Sometimes I would select Fuzzy tool to delete areas with same color but in photo/raster images it's hard to target.

In vector file, I would no need to remove background selection by selection because Fuzzy tool can select background which happens to be of same color and I can remove background. Depends on vector too of course because with manually converted photo to vector the background would still have variety of colors from conversion.

Here's my current image that was converted to vector. I am trying to find a faster way to remove background.
What would be your advice?

   

Print this item

  is it me or is it Gimp?
Posted by: Ofnuts - 12-04-2017, 03:36 PM - Forum: General questions - Replies (5)

In the attached XCF (small!: 5x5pixels), there are 4 layers: 1, 2, 3 and the problem layer, "Numpy Ops" (which is identical to "1", with one red and one blue square). For me, this layer:

  • Shows in the Layers list, but behave as a transparent layer in the Image window.
  • Remains invisible if I copy/paste it over itself (Ctrl-C,Ctrl-V,Ctrl-H)
  • Produces a visible copy if I copy it as a new layer (Ctrl-C,Ctrl-V,Ctrl-Shift-N)
  • Can be painted over, but the painting only shows in the Layers list
Is it the same for you?

The layer is produced using the "pixel region" API for Python...



Attached Files
.xcf   NumPy.xcf (Size: 1.59 KB / Downloads: 52)
Print this item

  Possible to replace foreground with background?
Posted by: gimper - 12-04-2017, 10:10 AM - Forum: General questions - Replies (2)

I'm new; this is my first message.

I'm new to GIMP, but I'm learning everyday.

My question is: 

Is it possible to cut out the foreground of an image and replace the cut out area with a continuation of the background in such a way that the new image looks flawless and continuous?

If the background is just one simple color, this would be easy.

Similarly, if the background is a simple repeating pattern, then this would also be easy.

But what if the background is not simple?

Here's a concrete example of what I mean:

Let's say I take a photo of my friend standing in front of a wooded area with trees and the sky in the background and the green grass at his feet and everything else you would expect to see at the woods.

I can easily cut out my friend's image from the photo.

But is it possible to fill in the empty space where my friend's image was with a continuation of the background in such a way that the resulting image looks as if my friend were never there to begin with?

Print this item

  Making a precise blurry border
Posted by: Espermaschine - 12-03-2017, 08:58 PM - Forum: General questions - Replies (3)

Finished my season's greetings image yesterday and the thing i surprisingly struggled the most with was getting the vignette/blurry outline right.

Lets say i want something like this:

   

and i want perfect control over every detail of my blurry border. I want a certain area to be opaque, the rest blurry and i want to perfectly control how far the blurry region reaches.
How would you do this ?

Shrinking and feathering doesnt give me very predictable results....

I tried to solve the problem by reversing the approach:
shrunk a selection, inverted, activated the quick mask then blurred and manipulated with the curves tool.
Its still not the perfect solution.

   






Stars on transparent background for examples.
   

Print this item

Photo Inspired by 70s scifi book covers.
Posted by: BlueHobbit - 12-03-2017, 04:04 PM - Forum: Gallery - Replies (8)

City Of Fire.. or Termites In Space.. either work really.

   

Print this item

  How to export pixel data to excel?
Posted by: Razorclad - 12-02-2017, 08:17 PM - Forum: General questions - Replies (3)

If you use a selection tool to select a perimeter of an object, is there a way to output the pixel locations (x and y) to excel?

Print this item

  Mug sublimation images.
Posted by: Pal1 - 12-02-2017, 05:24 PM - Forum: General questions - Replies (19)

Hi guy's I'm a newby  Big Grin I've been trying to learn how to use gimp for printing images for mug sublimation. I've looked on youtube etc for tutorials but not found what I need. (I'm not very good at this) Blush I want to open a new page/box A4 size then add two images at 10cm width and 8.5cm high to the top of the A4 page/box. I would want the two images side by side. And then to duplicate them on the same page/box. Any help would be superb. 

Cheers, Pal1

Print this item

  How to Create Outline Effect with Drop Shadow?
Posted by: TechnicGeek - 12-02-2017, 06:02 AM - Forum: General questions - Replies (12)

Hello,

This screenshot below should demonstrate what I want to do:

   

I used to do it in other software with Drop Shadow but when I tried that effect in GIMP, I was only able to create blurry outline. There is only blur control unlike in other graphic designer.

Would like to know how to do this properly in GIMP, even if it takes other type of effect to achieve desired result.

Thanks.

Print this item

  ofnuts Addon Manager problem (Fonts only)
Posted by: Espermaschine - 12-02-2017, 03:32 AM - Forum: Extending the GIMP - Replies (2)

Problem: sometimes im unable to deactivate font folder.
It processes, but never finishes.

Deleting the .active file doesnt help.

I always find a copy of the folder in the 'gimp2.8 User/fonts' folder.
Deleting this folder-copy and the .active file solves the problem.

It seems this occurs, when i add a folder with the manager and quit Gimp.
After the restart i cant disable the folder.

But this behaviour is not with every folder.
Some work and some dont as if it depends on the fonts inside the folder.

This never happens with other assets like brushes, pattern, gradients.

Is this perhaps related to the font name or when i have a font installed on my windows7 system and the same font in an active font_storage ?

Print this item