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?
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?
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.
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.
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 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 ).
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)
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.
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
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.
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?