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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,343
» Latest member: Stroitelna_xaer
» Forum threads: 6,655
» Forum posts: 36,273

Full Statistics

Latest Threads
How good are you at guess...
Forum: Watercooler
Last Post: Krikor
2 hours ago
» Replies: 15
» Views: 410
creases
Forum: General questions
Last Post: rich2005
6 hours ago
» Replies: 5
» Views: 95
Color change
Forum: General questions
Last Post: rinaldop
Yesterday, 04:07 PM
» Replies: 5
» Views: 236
Scaling an image to a fix...
Forum: General questions
Last Post: denzjos
Yesterday, 03:25 PM
» Replies: 4
» Views: 221
AppImages and Help Files
Forum: Alternate Gimp packagings
Last Post: CtrlAltDel
Yesterday, 10:37 AM
» Replies: 2
» Views: 114
How do I make this image ...
Forum: General questions
Last Post: Krikor
Yesterday, 09:23 AM
» Replies: 4
» Views: 156
How do I remove the backg...
Forum: General questions
Last Post: PixLab
Yesterday, 12:40 AM
» Replies: 4
» Views: 235
I Have A Custom Ubuntu 24...
Forum: Alternate Gimp packagings
Last Post: Tas_mania
04-25-2024, 11:00 PM
» Replies: 5
» Views: 653
GIMP not utilizing NVIDIA...
Forum: Linux and other Unixen
Last Post: Ofnuts
04-24-2024, 09:01 PM
» Replies: 12
» Views: 392
Bulk LUTs Previewer
Forum: Other graphics software
Last Post: denzjos
04-24-2024, 08:57 AM
» Replies: 0
» Views: 105

 
  Minimize noise in drawings; keep only intended shades
Posted by: Gully - 06-17-2022, 01:34 PM - Forum: General questions - Replies (4)

I am trying to draw/paint with only 4 gray shades on top of a black background. I am then exporting the drawing to a file that is read into Python with the PIL library (for image processing) as an image mask. When the file created in GIMP is read into Python, a quick look at the values associated with the palette indicates about 20 values. I'm only expecting five values, the background and four gray values, and not sure why this is happening. I think it possibly has to do with pixels that are not one of the shades I'm trying to stick to in the drawing, what I consider noise. I don't have much graphics background, so I may not have the language I need to describe my problem.

My workflow is:
1. Add a new layer over a camera image I'm working with. The new layer has a black background, the HTML notation is 000000. Call it "next".
2. I select the next layer, turn off its visibility to see the camera image with AOIs (Area Of Interest).
3. I use the paths tool to trace the outline of an AOI on next layer. I modify the paths to fit the AOI best I can.
4. I stroke the path to finish that AOI. I use a white color to stroke the paths.
5. I repeat 3 and 4. I have 4 AOIs in each camera image I'm working with.
6. I pick one of HTML notation colors 030303, 070707, 0b0b0b, or 0e0e0e as bucket fill for inside of each AOI.
7. I change the zoom to 200 or 400% to get a good look at the white outline of each AOI. I pick the respective gray per AOI and color over the white outline to make the whole AOI just one shade and get rid of white.
8. I change the mode of the layer to Grayscale in the Image menu.
9. In Layer>Transparency> Remove Alpha Channel
10. I export to PNG and save as 8bpc Gray with no background color.

I import the PNG to Python and then find that there are 16-20 values in the image.

I've attached an example of one of the next images. It's hard to see one of the AOIs because the 030303 is hard to tell from 000000, but you can see that AOIs get darker from one end to the other.

Is there a way to make sure that I'm just getting the background and the four AOI shades in the PNG?



Attached Files Thumbnail(s)
   
Print this item

  Error Message
Posted by: Owen Jones - 06-17-2022, 06:26 AM - Forum: General questions - Replies (5)

Hi,
I keep getting the same error message.
How do I either disable or deal with it, please?
It's driving me mad :-)

Excessive number of Xmp.photoshop.DocumentAncestors tags found: 1001. Only keeping the first 1000 values.

Thanks,
Owen

Print this item

Python Trouble replicating posterize with blending option enabled in python-fu script
Posted by: Error - 06-16-2022, 07:29 PM - Forum: Scripting questions - Replies (3)

Hello! I've recently started scripting with gimp and I've ran into a problem with posterize. I believe the issue is with how I am trying to implement the blending option. Does anyone have experience with automating the posturize tool with a blending option enabled?

I've found:
gimp_edit_blend()
gimp_context_set_paint_mode()
gimp_layer_set_mode()

Removed Alpha layer, manually using the posterize tool with 2 levels an color erase blending
[Image: asdf.png]
With my tool set to 2 levels using gimp_edit_blend
[Image: qwer.png]

Code:
srclayer = image.layers[0]
pdb.gimp_image_insert_layer(image, pdb.gimp_layer_copy(srclayer, 0), None, -1)
pdb.gimp_drawable_posterize(image.layers[0], amount)
pdb.gimp_context_set_paint_mode(57)
image.layers[0] = blendColorErase(image.layers[0])

It's quite possible I'm completely missing how the posterize tool accomplishes the blending. So far the results I've been getting are as if I had no blending mode selected (Replace/Normal). I'm aiming to use the Color Erase paint mode, but I'm running out of ideas what I'm doing wrong.

Thank you for reading.

Print this item

  Batch convert into webp
Posted by: meetdilip - 06-16-2022, 03:23 PM - Forum: General questions - Replies (9)

A friend of mine, who is into web development, optimises the images by making them small, say 13 -20 KB. He uses Photopea to get his favourite image size at 2000 x 1309 px and exports it into webp format.

I am amazed that he manages to convert even full HD images in the 15 - 25 KB range. Wondering if we can do that same in GIMP. And apply it a number of images. Thanks.

PS: I do have BIMP installed. But not sure how to use properly for this use case.


The best I could do was 1.4 MB from Unsplash to 422 KB using resize and then convert to webp.

Print this item

  3D text extrusion effect: A simple way without plugins
Posted by: PixLab - 06-16-2022, 03:02 AM - Forum: Tutorials and tips - No Replies

No script, no G'MIC, no plugin of any sort needed.
It's one of the easiest way and fast way, I can think. It has some limitation with angle, though... I often use this method for a fast, quick and not dirty way to do extrusion without "thinking".
Angle's limitation are every 45 degrees (8 angles)

   

!) Once you have prepared the face of your text you can start (for this exercise I just did some wooden text with a map (Bump and Displace)).

- On your decorated text layer ➤ Layer ➤ Crop to Content.
- Then duplicate that layer.
- Create a group and put that duplicated layer in it and keep it selected.
- Click on the duplicate layer button at the bottom of the layer stack as many time is needed, just keep in mind that 1 layer will be 1 pixel extrusion, thus 50 layers = 50 pixels extrusion (3D)

   

With the top layer selected (never select the group itself), select the Alignment tool  Align In tool option use ➤ Relative to Active Layer
- Then select just a bit bigger than the layer size (use your mouse like you're using the rectangle selection tool), don't select the full image (remember the Crop to content we did earlier  Wink ).
Once select, 4 white squared dots will appear = selection success

Setting In the Distribute ➤ Offset X and Ywill be any combination of -1 to 1 (zero is included), then click on the 2 buttons of the Red or the 2 buttons on the Green square or the 2 buttons on the  Blue square, BUT NOT the yellow square (example below)

   

Once it's done, go to the layer stack AKA layer dialog, then at the bottom Shift + Click on the merge icon (with "Shift" it will merge the full group as 1 layer)

   

Tips:

  • Once it's merged down you can duplicate the layer to make the extrusion twice the size.
  • Input 2 or -2 in the Offset X Y to get a more rough extrusion (stone text for example)
  • You can use a mix of the R-G-B buttons, for example the Left side red button with the Bottom blue button (over and wait a second on a button to know which from layer's side it will align, in the end for this very specific extrusion we don't really care.
  • If you Ctrl+Z during your test, before to click again on the buttons of Distribute, Just re-select the layer if there is no response to the Alignment.
  • Remember your first layer, the original one?, put it on top in the layer stack and play with the curves Colors ➤ Curves... to give it a slight more light or darker, to give the extrusion a "shadowy" or "brighter" effect, like below (it's very slight)
  • Last not but least ➤ https://docs.gimp.org/2.10/en/gimp-tool-align.html

   

Print this item

  Stylus / Mouse Pen or what??
Posted by: Jammylamplady - 06-15-2022, 07:44 PM - Forum: Windows - Replies (1)

Hi - I've been using GIMP on and off for a while, but I've just bought a Windows 11 tablet [HP Pro x2 612 fwiw], which has a touch screen. I was hoping to be able to use some species of pen to draw lines etc. in GIMP. Could anyone tell me what I want?? It's not a graphics tablet or it would be easier to find what I need. I think. TIA.

Print this item

  Cropping images
Posted by: j3trooper - 06-14-2022, 09:13 AM - Forum: General questions - Replies (3)

Hi,
I am new to editing and am trying to crop a photo but cannot get it to resize to fill the screen. I am left with the cropped photo and then the cropped section just showing white.
I have tried the various options:- Current layer only; Delete cropped pixels;Allow growing;Expand from centre and shrink merged but still cannot get the cropped photo to resize to fill the screen.
When trying the various options I have to replace the previous photo exported with one of those options checked to see if the result is what I am trying to achieve.
How do I crop a photo so that the cropped image fills the screen?
Is there a way to preview the cropped photo without having to export it?
Thanks for your help

Print this item

  sizing issues
Posted by: dmoss74 - 06-14-2022, 05:52 AM - Forum: General questions - Replies (1)

i typed a lot, but must have inadeptly hit send, first, before finishing. 

long story short: i have a 4x4 image. i want to place it in a 4x6 frame, to print (keeping the original 4X4 aspect ratio. 

how do i do this in gimp? i would also be doing much the same to drop 4x6 images into a 4X5 frame, for instagram. all the while, keeping the original image's aspect ratio.

thanks.

Print this item

  Pasting Images, Windows 7 32-bit GIMP 2.8.22
Posted by: Songbird - 06-13-2022, 06:14 PM - Forum: General questions - Replies (1)

How do I put one image onto another? I need to put a pencil, a paintbrush, a set of music notes, and letters and numbers in certain specific places on the big smiley face I've drawn and saved. Also: how do I fine-tune the size of these images as I place them on the smiley face?

Print this item

  Is there a plug-in that can straighten lines in an image?
Posted by: Dimitar971 - 06-13-2022, 09:43 AM - Forum: Extending the GIMP - Replies (1)

Hello,

I recently discovered a program, called PixageFX, which can convert images to pixel art. As the image is converted, all the lines in it are straightened as shown in the links below.

Before:
https://ibb.co/Ny7NCZR

After:
https://ibb.co/Wg18Rzw

(Sorry, the site constantly gave me errors when trying to embed the images here)

You can also check the program on Steam.

The program has to be purchased. I was wondering if there is a plug-in that can straighten lines in an image like that?

Thanks,

Print this item