Help with coloring black and white image.

Discussion in 'General Discussion' started by ichiban, Mar 15, 2011.

  1. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I am a newbie to this. I am a Landscape Architect by profession. Found GIMP by browsing the webb.
    Have installed it and have gone thru several tutorials online. What I am trying to accomplish is to
    take a 2d pdf black and white file and apply colors to render the drawing in 2d? What is the best way to
    accomplish this in GIMP?

    thanks

    ichiban
  2. David Wood

    David Wood Active Member

    Joined:
    Jul 22, 2009
    Messages:
    5,472
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home page:
    Use a soft brush and set the blend mode of the brush on Multiply. Or leave the brush's mode alone and create a new transparent layer and set it's blend mode on Multiply.
  3. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    DWood;
    thanks - am proceeding on with gimp. My next task is to make my own brushes. One of interest -
    I am a landscape architect and do 99% my work in Datacad. Now that I have Gimp, I am rendering
    my drawings that have been saved as pdf's. Once brought into Gimp, I have been able to do the
    color rendering as you suggested. At this early stage of learning - NOT BAD.

    Now I have the occasion to render objects in the pdf that are geometric in shape, like a template of a
    palm in plan with 5 sides at equal angles developed in cad. But to make a brush - well, it has been quite
    the task. AFter reading and searching online about brushes, some sites have said that most anything
    brought into Gimp may be a BRUSH. After reading all of that material, it does not seem to be true.
    I import a pdf of the palm template to save as a brush, after save as, name it, with .gbr extension and save it to the gimp brush folder in gimp, it is not there. After watching the tut's about brushes, I see
    nothing about once a file is imported into gimp and save as a brush in .gbr format it becomes a brush.
    Only after you open a new file, set background as transparency and draw a squiggly line and save it
    as supposed to, yes it is a brush for use.

    My question is - Can a simple line pdf be saved as a brush once inported into gimp?

    thks

    Louis Wynne/landscape architect
    ichiban
  4. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    Well, I do not know what you've been doing wrong, but once a ".gbr"-file is inside the Gimp brushes-folder, a brush will be displayed in your brush dialog in Gimp.

    Maybe there's something wrong with the dimensions of the image or the folder you put it into.
    I'll just explain the whole process in detail to make sure you didn't get anything wrong.

    Try making a new image in Gimp (File > New Image) and set it to 200x200 pixels at 72 pixels per inch (just for this example). Afterwards, go to "File > Open as Layer" and open up your image/pdf. Make sure the pixels per inch are set to the same value as your new image's (the default for Gimp is 72 ppi). Just move the layer around a bit with the Move-Tool until you see something (just for the test again).
    Now, click on "Image > Save as" and save it onto your desktop as "Example.gbr". Gimp will ask you to combine the layers and set the distance of the brush etc. (just hit okay).
    Now that's finished, open up your Gimp-brush folder, which is on a different path depending on your OS and the way you installed Gimp:

    Linux: /usr/share/gimp/2.0/brushes (you need sudo rights to change the Gimp folders)
    Windows XP: C:\Documents and Settings\<username>\.gimp-2.6\brushes\
    MacOS: /Users/username/.gimp-2.6/brushes/ (sudo right required aswell as far as I know)
    I'm not sure about Vista and Windows 7 though.

    Drop the file into the folder and you should be fine.
    Now, close Gimp and open it up again. If you now click on a tool like the brush-tool, you will find the newly-made brush at the dropdown menu.

    If this does NOT work for you, there might be a problem with your software.
    If this DOES work, just make it 400x400, or even 1000x1000 and try it again to get your full PDF image onto one brush.


    Hope this helped,
    Arzo
  5. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Arzo
    Did exactly as you said, did make a brush, BUT, when I use the brush there is an invisible background
    (a square) that goes over the area and blocks out the pdf image to be colored.

    I even uninstalled gimp and reinstalled it.

    wish I could send you the pdf?

    But, will keep on trying, thanks for the info.
    ichiban
  6. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    You can ofcourse send one of us the pdf, just upload it somewhere and send us the link here. But I think I get your problem now.

    Is your pdf with the stamp-template white and the image you want to have as a stamp is black (or anything but white)?
    Then you have got to remove the background first and make it transparent, and THEN you do the same thing again.


    How to get rid of a simple white background if the object has a clear shape:
    First of all, load up your image (/pdf) in Gimp. It probably has not got an "alpha channel" yet, which is the channel that displays the transparency of every part of the image. Because you want the background behind your focal object to be transparent, you need an alpha channel though. You add one by right-clicking on the layer your object is on in your layers dialog and then clicking "Add Alpha Channel".

    Now that your image can display transparency, you will have to remove the (white?) background from your object. You can do this by either using the Wand tool (it selects any color area by clicking on it. After it is selected you can delete the color by pressing the delete key on your keyboard or clicking on "Edit > Cut") or the color select tool (next to the wand, it selects a specific color all over the image) or by using "Color > Color to Alpha" (it just deletes every part of a color inside your image. If your object is for example light blue though, it will become semi-transparent if you delete all the white in your image).

    Now that your object is on a transparent background (symbolized by the checkerboard-like pattern), you can save it as "Example.png". PNG-images can save transparency, so it's important not to choose jpg or another filetype.
    Now, open up a new image (400x400 for example), but under the advanced options, select "Fill with Transparency".
    Now do the "open as layer" thing again but this time you choose your object as "Example.png".

    If this is too confusing, just post a link to the pdf here if you can and I'll see what I can do to explain this in an easier way.

    Arzo
  7. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    <a class="postlink" href="https://rapidshare.com/files/460471109/TREE_1.GBR" onclick="window.open(this.href);return false;">https://rapidshare.com/files/460471109/TREE_1.GBR</a>

    Arzo - this is the gbr file for a tree, rendered in gimp to be saved as a brush, but, when I go thru the steps to save it will save in the brushes folder of gimp, but when I click on it, size it as needed, it comes out with a square instead of round. HOWEVER, in the top of the brushes folder, it appears on the clipboard - and comes out round. After I get out of the file and exit gimp, and re-open a file to test it - it is gone from the clipboard, still in the brush folder, but comes out square (with ears - the box corners or still there, instead of being round.

    ichiban
  8. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    Okay, you did nearly everything correctly ;)

    But the tree you used still had a white background. When using the brush, it will not only paint the tree, but the white background as well, and therefor it will appear on top of a white block.

    To get rid of the white background, you either go "Colors > Color to Alpha" or "Color to Transparency" and choose white as the color you want to remove (warning, this will also delete the light-green parts of your tree and therefor make the tree itself a bit transparent) OR you make it the better looking way:
    -Open up the BRUSH.GBR in Gimp (the file itself!)
    -Click on the wand tool in your tool dialog:
    [​IMG]
    -Then click on the outside of your tree which is white.
    -Go to "Select > Feather" and set 2 as your value.
    -Hit the delete button on your keyboard some times.
    -Save it again and put it back into your brush folder.

    By doing it this way you remove the white background without changing the tree itself. This is how it should look like in the end:
    [​IMG]
    (Same tree but without the white background)

    Link for the finished .GBR file:
    <a class="postlink" href="https://rapidshare.com/files/460478665/TREE_1.GBR" onclick="window.open(this.href);return false;">https://rapidshare.com/files/460478665/TREE_1.GBR</a>
  9. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Arzo - thanks a bunch man! I knew I was close by watching the you tube videos.

    Don't care what your neighbor says - you're alright.

    ichiban
  10. ichiban

    ichiban New Member

    Joined:
    Mar 14, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Arzo;
    Do you know where I can find some 2d (top view only) of cars, trucks, boats, etc. I have searched
    all over and found limited images.

    ichiban
  11. Arzoroc

    Arzoroc Moderator Staff Member

    Joined:
    Oct 12, 2009
    Messages:
    2,201
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    Germany
    Well, the problem is that most of the images out there are copyrighted.
    Some license-free stocks are available at <a class="postlink" href="http://www.sxc.hu" onclick="window.open(this.href);return false;">www.sxc.hu</a> and there are always some stocks on <a class="postlink" href="http://www.deviantart.com" onclick="window.open(this.href);return false;">www.deviantart.com</a> but you'll have to read about the author's copyright there.

    If nothing helps, try google :/

Share This Page