How to antialias a logo?

Miscellaneous Forums/General Discussion/How to antialias a logo?

Bit of a graphics newbie question this. I have a background image and a logo and I want to put the logo onto the image antialiased so the edges look nice. How can I do this in Paint Shop Pro 4 or 5 (or something else) as I can't find an easy way to do it apart from resampling at a different resolution which is dumb.

You would have to vectorize the graphics with some specific brushes selected if you want the nice anti-aliased look, not sure which tools in PSP can be used to recreate the logo as such though, Photoshop user here. =\

Macromedia Flash also has an option to take an image and vectorize it for you with a couple of options to tweak, but whether or not you own the program, I dont know.

hmm, I have corel draw 10 (inc. corel paint) maybe I should check that. All I want to do is dump the (transparent) logo on the image but have it antialias the edge as it does it.

Select all edges sharp.

Choose feather selection or similar, by 2-3 pixels. This softens the selection mask.

Then hit delete.

You may have to invert the selection.

I'd code it....lol.
Make an image of the size of the background image with the logo in place such that it would paste exactly onto the background image, the logo being in the right place.
You could draw the back, then the logo, masked, then read through each pixel on the resulting image checking its difference to its surrounding pixels, and if its outside a range, move it within so that the difference in r,g and b between any two joined pixels is not too great (horizontally and vertically/both simultaneously): Of course that would fuzz the whole image, so 2 solutions to doing that could be:
a{
Make a black and white (and when i say that i mane FFFFFF and 000000 pixels only) version of the sized logo image, with black as the background and all logo-pixels white.
Then detect the images edges, and smooth the resulting image so the white edges smudge into the black non-edges, but not too much.
Then take the program aboves output, and alpha paste it (depends on what your using: could also be coded/added onto the above code) onto an image that just has the logo pasted onto the background (ie in paint), using the lumination of each pixel the edge-deteced+smoothed image as the corresponding pixels alpha value when calculated against the image being drawn onto: Such that the smoothing is only applied to the edges! (Alternatively yhe whole Program idea could be ignored and a smoothed image be used to siulate the image resulting from the above coded smoothing method.
}
or b(my original thought){
code the edge detection and produce the alpha map in code, etc.
}
or c{
ignore me as this would take many many minutes to do in Blitz (maybe even 10!)
}

The easies way to do it would be to first put the background on a background layer, then copy the logo onto 3 or 4 other layers.

Make each layer a little transparent, 10-40% should be ok.

GO in on each layer, and take the fill tool, have it fill with an anti-alias and enough so that when you fill the blank space of the layer, it eats away at the edges of the logo slightly.

Fill, then select with the magic seletor... magic wand thingy... and delete your fill, do that once on the first duplicate layer from the background.

twice on the next one up, and 3 time on the next, and so forth, make sure you set the top logo layer to 100% transparency so you can't see through it.

This should give you a good antialias.





These are a before and after... I used photoshop, but the tools should all be there in some form.
this is only 3 logo layers... if you do about 5 and use a lower transparency on the lower logo layers, it will look better.

dude you're trying but that actually looks really bad, sorry.

lol at aab "maybe 10!", yeah like x100. Thanks anyway.
hmm, thanks for te idea DampeS8N, I'll just try One Eyed's first.

Why the hell haven't these paint packages got this stuff built in, we need a mini community app to do it. Aab, free up 10 mins from your busy schedule!

@Grey Alien,, Corel PhotoPaint should be able to handle that no problem.

I'll try to explain, but bear in mind that I live in Spain so all menus are in Spanish, also I'm using v9 instead of 10, but that should be quite similar.

First you need to have your logo in a layer as an object, then go to the object menu, and near the end select Fussion or something "Fundido" in Spanish it's Ctrl+Shift+F, select the amount you want and you are done.

OK I'm being dumb here, I can't get One Eyed's thing to work (delete just seems like a weird step!) nor MadMax's.

MadMax, I got the logo as an object but it's not transparent i.e. the background is black. If I can make it transparent then maybe the rest will work.

Ah well that shouldn't be too difficult, what I do is using the magic wand(or the colour mask, depends) mask the black bit, then invert the mask and turn selection into a new object.

In psp, you can paste another image onto the current one and it assumes the background colour is transparent. Can't do that in corel, so can you just pick a colour and say "this is transparent"? I don't know how the wand or mask works you see :-(

ok figured out the lasso and then use feathering works nice apart from one problem, the logo has an O and and A in it, in other words, the inside of the letters is not transparent ... arg. I just need to make black transparent and then paste it with a feathering effect onto the background.

Woohoo, did it in Corel with a colour mask to black on the logo, and then invert. Copied this to new image as object, applied a 2 pixel feather and merged with background. Thanks all, you all helped in different ways (except aab ;-))

well, if you want all black to be transparent use "color mask".

I'm on MSN eb8NOSPAMcth@... just take the NOSPAM out of the middle. I'm glad to help a CorelDraw user.

Thanks for the offer, I've managed to sort it. I know Corel Draw very well, used it for 10 years since V3 but not used Paint as much.

I've posted a request for antialiased edges in the Blitz Plus programming forum if any of you would like to help. Cheerz. http://www.blitzbasic.com/Community/posts.php?topic=51584

er... well my way works fine, the one I did was only 3 layers so it looks bad, but it isn't the more the better, cause each time you add a layer, it moves the edge of your item in 1 pixel, or rather, transparencies another pixel inwards... My example was just to show that it works, I do all my pixel work with this trick, I know it works, and works well if you fool with the transparency on each layer individually till it looks right, even on 3 layers it will look ok.

so, nyaaahhh

Err DampeS8N,

Why dont you just use the magic wand thingy, select the letter B, paste it into a new layer, then with the layer effects apply a black outer glow to the layer. It would look much nicer than that thing you posted.

yeah, but what if the logo isn't black like my B....

what I described will create perfect antialiasing if done with care, unlike I did.

If you have Photoshop use this action : http://www.indiepath.com/tim/anti-alias.atn
The result:-
1Pass

2Passes


Anyone know if some old versions of Photoshop are free or at least have a register soon nag but carry on working forever? I don't really want to shell out for a full copy right now unless you all think it's "essential". Besides I got it working in corel in the end as I said. It's actually very easy and takes about 20 seconds.

Here is the Process for the action:-

1)Scale Image to 400% with Interpolation "Nearest Neighbour"
2)Apply Median Filter with Radius 2 Pixels
3)Scale Image to 25% with Interpolation "Bicubic Filter"

Voila.

hmm, might be able to apply similar process in PSP.

Videogame... that essentially does my my steps do, only it will fuzz up the entire thing, whereas mine will only fuzz up the edges, and in a very controlable manor.

Sorry DampeS8N what you did looks crap.

You could always zoom in and anti-alase with pixels

I love workikng with Pixels

yeah, but what if the logo isn't black like my B....

what I described will create perfect antialiasing if done with care, unlike I did.


You are not antialiasing, you are outlining.

Actually what I said was "antialiased so the edges look nice", so yeah, if scaling up, then smoothing and shrinking again gives a nice edge BUT also looses detail in the logo, it's not so good and an edge-based method is better. Having said that, the logo in my case is an anti-aliased corel draw export anyway so, the scaling method wouldn't really make it worse. In the end the feathering method worked very well like I said and was very quick.

However, seeing as noone has posted to the programming thread it looks like I might write a routine to do it in code. Rather than antialias the whole image I am going to need to do edge detection (easy as the background is uniform black) and anti alias a couple of pixels at the edge (in all directions I guess) but not in the centre of the logo. This way I can show a logo flying around and anti-alias it onto the background when it lands without having to store extra bitmaps in the data folder. Great for menus too. Should make it look nice and pro.