PDA

View Full Version : Converting Bitmaps to 1 Bit or 8 bit gray



Terry Swift
05-13-2010, 8:37 PM
I've got a bitmap that was originally yellow outline with a green fill. Tried a test piece to see if I could change my lasers print settings to print yellow, but not green. That didn't work as it did the fill as black and no outline of the letters. I've tried converting it to both 1-bit b&w (looks horrible) and 8-bit gray scale which would be great if I could make the fill gray and the outline black - so that the laser only prints the outline. I have looked at most of the settings in Photo-Paint X4; but have not found any settings that can do that and the customer wants only the outline. I've even Googled it and they mentioned a Tbitmap program or set of scripts that supposedly does this but I didn't find where to download if it's a program or run the script.

I'm pulling what little hair I do have left out with this and find I'm getting nowhere, so I come to the Experts and Long-time laser folk for ideas & suggestions.

Gary Hair
05-13-2010, 8:57 PM
Terry,
The color mapping in any laser is only for vectoring, not bitmaps (rastering). If you want to laser part of a bitmap you'll have to convert it to vectors and then map the colors to your laser driver. If you post the file maybe someone here can help. If not, there are people who do vector conversions for a living - William Desrochers at excaliburcreations.com is one that I use often and has a great reputation among engravers.

Gary

Bill Cunningham
05-13-2010, 10:51 PM
And remember, a 1 bit bitmap looks horrible on screen because your screen is not made to render them correctly. Etch it and you will see a big difference..

Dan Hintz
05-14-2010, 6:44 AM
Gary,

I don't know what the driver is like for Terry's older M300, but current ULS models use color mapping for everything. You can have, for example, 5 different raster speeds/powers and 3 different vector speeds/powers in the same drawing, all color coded.



Terry,

You need to bring the image into a raster image editor (Photoshop, Paint.NET, etc.) and change the green outline to red... that's easy as you can use a color picker and convert the single (or range of) colors to black. You'll need to use a vector program (Corel, Illustrator, etc.) to trace the red outline into a true vector.

For the yellow, use the same technique to turn it to black (or a shade of gray).

Set driver appropriately and print.

Martin Boekers
05-14-2010, 9:43 AM
I have issues with military shields, as most of them have a yellow outline.

I use PS but I'm sure PP has a similar correction adjustment.

It's under image - adjustments and called hue & saturation. You can isolate colors and increase or decrease density and saturaion individually, a quick fix for many images.

Also the magic wand selection tool is quick to change colors of a selected area.


Marty

Gary Hair
05-14-2010, 10:00 AM
current ULS models use color mapping for everything. You can have, for example, 5 different raster speeds/powers and 3 different vector speeds/powers in the same drawing, all color coded.

My GCC has 16 speed/power settings but I was told that they are only applicable to a vector image, not a bitmap. You can set all 16 to specify different raster (or vector) speed/power settings but you need a vector file to start with. I guess I'll have to test it to see if it does anything with a bitmap, but I don't think it does.

Gary

Dan Hintz
05-14-2010, 11:39 AM
There are times when I wish the color selection wasn't limited to 8...

Gary Hair
05-14-2010, 1:07 PM
There are times when I wish the color selection wasn't limited to 8...

It's funny, but the only times I have used more than a couple are when I'm running a test grid/pattern to determine optimal speed/power settings. I honestly can't remember the last time I used more than 3 on one job. About the only thing I can think of where it would be useful for lots of colors would be if you wanted to control the order of cutting or rastering without having to move objects in object manager.

What have you done that you could have used more colors?

Gary

Dan Hintz
05-14-2010, 1:16 PM
About the only thing I can think of where it would be useful for lots of colors would be if you wanted to control the order of cutting or rastering without having to move objects in object manager.
Bingo! It's also ideal when I have an object with a large number of Z-levels... I can set the Z-axis height for each area of differing height and let the table keep the item in focus. This beats having to run one section, refocus, run another section, on and on and on...

AL Ursich
05-15-2010, 3:47 PM
Just a thought thinking outside the box. Make a Stretch then use paint to add your own colors...

Lots of work but it could work.


AL

Rodne Gold
05-15-2010, 4:33 PM
Gary , colour mapping will only work with vector based fills etc - a raster image in corel will be rastered using the print driver. Im sure all other drivers work the same way.?

Colour mapping in the GCC driver can be used to map non stock vector colours , IE you can map red to turquoise.

I use various colours in a drawing for controlling order of cut , quasi 3d and some optimisation strategies.

Gary Hair
05-15-2010, 4:46 PM
Gary , colour mapping will only work with vector based fills etc - a raster image in corel will be rastered using the print driver. Im sure all other drivers work the same way.?

That's what I thought, but Dan made it sound like his driver would work with a bitmap file where mine only works with a vector file. Actually, maybe he didn't make it sound that way, it's just the way I read it...

Gary

Bill Cunningham
05-18-2010, 9:44 PM
Do some drivers (not mine) vary the power on a bitmap across a gray scale to create the 3d effect? Would this not also vary the power based on colour density? i.e. black would engrave deeper than yellow..etc..

Rodne Gold
05-19-2010, 12:16 AM
The engraver will engrave black darker than yellow , but not neccesarily deeper - the spacing between dots of engraving is less as you go lighter - the power remains constant in greyscale engraving unless you specifically ask for 3d where the power does vary.
If you overpower the laser when greyscale engraving , then black might indeed be deeper but thats cos you are creating a big heat affected zone when doing black and the spacing of engraved dots is so close its actually "overburning" the material.

Dan Hintz
05-19-2010, 6:21 AM
Gary , colour mapping will only work with vector based fills etc - a raster image in corel will be rastered using the print driver. Im sure all other drivers work the same way.?
I've attached a pic of the ULS driver screen (one of them, anyway) showing the 8 colors and how you can select between raster and raster/vector. Each color can have its own speed/power/dpi settings, and every color can be set to raster.

Rodne Gold
05-19-2010, 7:58 AM
Dan - what we are talking about is colours in a bitmap image - ie those colours cannot be mapped to speed and power or any other thing , IE importing a bitmap with yellow and green wont let you assign speeds and powers to that yellow and green.

Dan Hintz
05-19-2010, 8:12 AM
If you limit your import palette to the 8 main colors (which includes yellow and green), then it would work without issue. Most programs will try to find a "closest match" when forcing a new palette onto an image, so in this case it would be a very quick fix. It would certainly be quicker than using the "eyedropper" for every color to change it to one on your palette, and still probably quicker than reducing the color count (though in practice reducing the color count does the same thing as mapping to a new palette, the only thing that changes is the number of key presses).

EDIT: I know the ULS driver will do some form of interpolation if an image's color is not one of the main 8, though I never played with it much so I can't say what the algorithm is. Let's say an image uses an off green, like (0,255,15)... there will be some interpolation between the green setting and the blue setting. I cannot remember if the effect is different in 3D mode and standard raster mode... maybe some experimentation is called for here, if for nothing else than curiosity's sake.

Rodne Gold
05-19-2010, 9:01 AM
If your driver allowed you to set parameters for colours in a bitmap that correspond to the set colours your driver does allow you to map when using vector elements and fills , then you would have major issues engraving any coloured bitmap as the driver would chop and change settings whenever it finds a pixel that matches one of your colours.
It would also probably do multiple passes to complete that bitmap - as I would imagine it also acts like most other drivers and does the engraving in the sequence that the colours list in the driver.

At any rate the drivers Gary and I use wont allow us to map colours contained in bitmaps to various laser parameters.

Dan Hintz
05-19-2010, 9:58 AM
If your driver allowed you to set parameters for colours in a bitmap that correspond to the set colours your driver does allow you to map when using vector elements and fills , then you would have major issues engraving any coloured bitmap as the driver would chop and change settings whenever it finds a pixel that matches one of your colours.
rodney,

I think there's a disconnect here... it's up to the user to specify whether each color is to be interpreted as a raster or vector. If it's ticked as a vector, it must actually be a vector in the file and under 0.003" in width (i.e., hairline) for the machine to vector cut... otherwise it engraves the color as if it were a raster setting (the "vector" setting is actually listed as "raster/vector", so it has a default backup mode). The machine won't cut a raster image as a vector just because the color matches.

If I have a file that contains both raster and vector portions, I can set (for example), blue and green to be vector cuts of differing speeds/powers, and black, yellow, and red to be raster cuts with each one having differing speeds/powers. If the imported image only has raster data, it will raster the entire thing based upon the multi-color settings, and any colors I set to "vector" will raster instead at those colors' settings.

It's amazingly powerful, though I occasionally wish for more colors (16 would be nice).

Dave Johnson29
05-19-2010, 10:26 AM
Dan - what we are talking about is colours in a bitmap image - ie those colours cannot be mapped to speed and power or any other thing , IE importing a bitmap with yellow and green wont let you assign speeds and powers to that yellow and green.

Not sure about other lasers, but my ULS 1700 will do that with a BMP.

It does it in as many passes as there are distinct colors. Providing the green and the yellow were pure RGB green and yellow I can set the speeds for 8 or 9 colors.

It will do the yellow first and burn all yellow dots, then the green.

The color-for-speed list on the laser goes from black to orange and uses the 8 standard named Windows colors. If the bitmap had colors other than those exact named colors then I think they are ignored.

I am in the middle of a system recovery :eek::( otherwise I would show a pic of the list.

Dan Hintz
05-19-2010, 11:14 AM
Dave,

Pic is in message #15...

Doug Griffith
05-19-2010, 11:37 AM
I've attached a pic of the ULS driver screen (one of them, anyway) showing the 8 colors and how you can select between raster and raster/vector. Each color can have its own speed/power/dpi settings, and every color can be set to raster.

OT but your z axis control makes me jealous. Epilog, Bueller...

Dan Hintz
05-19-2010, 11:49 AM
OT but your z axis control makes me jealous. Epilog, Bueller...
It's one of the features that steered me towards the ULS machines over the Epilogs. When I'm engraving multi-level items, I don't have to stop and refocus, the machine does it for me.

Terry Swift
05-26-2010, 11:20 AM
Dan,

That looks very similar to the driver I have for my M300. It has the 8 colors and it allows raster, vector, raster / vector (not sure what that does), and skip.

I also got Paint.Net and it works like a charm.

I have run into an issue when rastering on black granite. I am running at the power / speed per my manual and it doesn't seem to engrave very deeply,which I think is they way it's supposed to be. When I paint the engraved part the paint doesn't seem to dry (using 2 light coats). I've even put the plaque in the oven with very low heat and the paint still wants to run when I'm cleaning up the plaque or just even touching it. I use Rustoleum, as I thought that would be a very good paint compared to the discount / store stuff. What kind of paint do you guys use?

I do have a small compressor and paint gun, so I can switch over to non-aerosol paints if need be.

You guys & gals are a great resource for us newbies when we encounter issues that we haven't had to deal with before.

Norberto Coutinho
05-26-2010, 11:39 AM
Do a google search for pebeo porcelaine 150.

Dan Hintz
05-26-2010, 11:45 AM
I just use a pea-sized drop of white acrylic paint from the tube... that's enough to cover a 6"x6" plaque. Picked it up for a couple of dollars from the local art store.

BTW, I've found the settings in the written manuals to be a poor starting point in many cases...

Terry Swift
05-27-2010, 1:14 PM
Dan,

So you are saying that using a can spray paint is not a effective way to add color to the engraved piece. I had thought of also spraying a light coat of clear on top of the paint and maybe that would stop the spreading when touched; but I can definitely do the acrylic tube stuff too. I know Laserbits has updated their laser settings for granite / marble; so I'll see what they post versus my manual. Doing it by the manual does seem to produce a low cut into the granite, thus allowing the paint to smear easily. I have mainly been doing 8"w x 10"H pieces of granite as people like the plaque look and I add an small tabletop art style easel to put it on, as most of plaque holders take away from the granite, while the easels are black and make the plaque look much more elegant - looking like a piece of art. Have been using Hobby Lobby as my source but they are expensive - and I found what looks to be the same thing on Wal-Marts website for almost half the price. Only negative there is keeping a supply of them as warehouse to store delivery can take about a week or more.

Dan Hintz
05-27-2010, 2:23 PM
My last post should say oil-based, not acrylic.

Don't expect a deep engraving on granite when using a laser... it's not a needler. If your paint is spreading through touch, it's not dry, and you shouldn't seal it until it is. Sealing should be used to prevent stains or offer some UV protection, not prevention of paint smears.

I engrave, dab a bit of paint on my fingertip, rub in, then leave to dry for a couple of days. Some choose to wipe off excess paint immediately upon application (at the expense of losing some of the paint), others wait a couple of days (at the expense of more elbow grease). Once dry, seal.

Using spray can stuff is wasteful in the sense that you're throwing a lot of paint on the substrate that's just going to get wiped off. You want just enough paint to fall into the valleys chipped out by the laser, no more, no less.