Assign HUE to the heavily-aliased text of a raster PNG

Post questions on how to use or achieve an effect in Inkscape.
User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Tue Jan 03, 2017 7:52 am

I'm attaching a heavily aliased PNG raster that I want to convert to RGB color. I need to know if there is a fast method (plugin? something other?) Inkscape has for colorizing little graphics like this that I can do quickly, on-the-fly as opposed to a more intense, bit-by-bit forensic method that I might use on something important — something I don't mind spending time on — such as a logo or a webpage tile.

These little graphics heavily aliased from text are so difficult for me no matter how much I colorize the page the WHITE text (or BLACK text if inverted) only works on the the edges of the rastered words and doesn't get to the HUE of the text's core color. This has always been a problem for me so I'm here to ask if Inkscape (or any other program? Image Magick?) would be best for little projects like this? Thanks.


WHISKEY.png
WHISKEY.png (63.2 KiB) Viewed 4404 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Lazur » Tue Jan 03, 2017 8:14 am

Hi.

You can do that easily by filtering.
A simple component transfer filter primitive can do the trick.
But if you don't like dealing with float numbers for each rgb channel, then you can use a threshold filter with two flood fills.

For example here is a pack of 64 of such threshold filters:
sixties threshold.

Some more variants on the fading is available here


(I know it could be done a bit simpler but it was made with 0.91 and that had a bug on the alpha compositing making the more streamlined solution not working.)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Moini » Tue Jan 03, 2017 10:41 pm

For doing this *and saving* the file, as a non-svg, in its original resolution, I myself would use gimp, Colors -> Colorize, pull on the slider, File -> Export as ... -> Done.
(but I don't understand what you mean by the core color, sorry...)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Wed Jan 04, 2017 2:35 am

I have to say, i dont understand they OP's question/problem either, BUT a white on black image screams mask at you !
So you could use masking to colorize.

Also finding a bigger version is not a problem with a reversed image search:
https://s-media-cache-ak0.pinimg.com/or ... 55f53a.jpg

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Wed Jan 04, 2017 2:17 pm

Lazur wrote:But if you don't like dealing with float numbers for each rgb channel, then you can use a threshold filter with two flood fills.

Lazur I . . . I'm sorry but I don't have a blessed clue what you're talking about!! :lol: Please explain? or point me to a tutorial discussing your recommendation? You're dealing with a NÔÔB!
Raspi wrote:I have to say, I dont understand the OP's question/problem either . . . Also finding a bigger version is not a problem with a reversed image search

Raspi you rock! Thank you for hunting down that larger image.
Moini wrote:I myself would use GIMP . . . (but I don't understand what you mean by the core color)

Moini I am aware that GIMP could probably do this much easier but the resource load is enormous ! Just turning GIMP on is like watching your memory drain into a giant suck hole. I literally cannot have anything else running if I have to use it, it's so bloated. Thank you nonetheless. I'll think about it.

whisky GREEN.png
whisky GREEN.png (232.5 KiB) Viewed 4311 times


Everyone . . .
Given how frequently I need to do this — colorize rough, crude greyscale images flooded with anti-aliasing as the result of rasterized text placed in the graphic at low DPIs — I was hoping you might recommend something that could do this with a low resource footprint.

Above you'll see I've uploaded a version of Whisky I created with a free graphics editor called Pixbuilder which I like because it has a small footprint. See that "halo" of GREEN? That is the result I get when I use Pixbuilder's "colorize" feature. I deliberately choose GREEN because it's loud enough for you to see it.

See how the letters are still WHITE? That's what I'm referring to when I say the letter's "core" color: the letters should be GREEN. If whisky were inverted (black lettering on a white background) the letter's "core" color would be BLACK and it would be BLACK that I was trying fill with a color — not just the edges (the "halo" I mentioned earlier). This issue has hounded me for so many years I am determined to find a solution. You'd think that "colorizing" that whisky graphic GREEN would actually make the letters green.

Does that help? Thank you for your suggestions and let me know if I need to explain what I mean by "core".

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Wed Jan 04, 2017 3:16 pm

Dunno why Gimp isnt working for you, but here is what i meant with masking.
Attachments
Colorize with masking.svg
(248.75 KiB) Downloaded 164 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Lazur » Wed Jan 04, 2017 9:14 pm

Well show me the way...

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 7:59 am

Lazur wrote:Well show me the way...

Wow Lazur um I don't want you to hate me for this . . . there is no way I can follow that video! :? I thank you nonetheless for all the time you invested in it and I'll go back and see if I can follow more of it. :shock:
Raspi wrote:Dunno why Gimp isnt working for you, but here is what i meant with masking.

Raspi that is exactly what I want: not just the edges green (the "halo" effect) but the white body of the text and glyphs — their 'core' — being green as well.

Did you do this Inkscape or GIMP?

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Thu Jan 05, 2017 8:02 am

vector.rex wrote:Did you do this Inkscape or GIMP?

Inkscape....its a svg file !

I did it with masking.
Read here:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... sking.html

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 8:23 am

Raspi wrote:Inkscape....its a svg file !

Alright alright don't shoot me!

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Thu Jan 05, 2017 8:33 am

vector.rex wrote:
Raspi wrote:Inkscape....its a svg file !

Alright alright don't shoot me!

:lol:

If i was you, i would try to find out why Gimp is so ressource hungry on your machine.
Thats not normal behaviour !

Using masking in Inkscape is a way to do this, but it only works on completely black and white images.

Lazur's suggestion might feel a bit like taking a sledgehammer to crack a nut, but once you got the filter set, you can apply it anytime to any project and change colours easily !

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 9:32 am

Lazur I'm sorry I got through the first two minutes of the video but it is extremely hard because I don't have a clue as to what I'm doing. It's alright I can just manually go in there and change them, the important thing is the text & glyphs are now in COLOR!

Everyone . . .
If you dig this little Turn-of-the-Century (no not the one we just had, behave!) — this Wild West Frontier style of product labeling — I'd like to invite the forum to help me make it look authentic, "distressed" edges, etc. Labels from the late 1800s would frequently not have WHITE in their product: Like the paper of newsprints (and WANTED —DEAD OR ALIVE— posters of the time) the label backgrounds would be what was available for cheap, such as
WILD WEST.png
WILD WEST.png (164 Bytes) Viewed 4209 times

I'm going to work with Raspi's GREEN DEVIL :ugeek: and set about to pull the lettering closer to parchment/sand hues. And I want to see if it looks better with the colors inverted: black lettering on a parchment/sand hue background.
I'll post my (major) revisions but I am not an artist so don't expect Caravaggio! :mrgreen:

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Thu Jan 05, 2017 9:43 am

@vector.rex

You do realize your poster is probably a rip off of the Jim Beam bottle, right ?

Changing the text is not a big deal: i can see three different fonts and a text on path effect.
You can try to identify the fonts on:
https://www.myfonts.com/WhatTheFont/

Making the poster look distressed is even easier with IS 0.92, now that we have new Blendmodes.
Find a texture on the internet and overlay it with a suitable blendmode.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Lazur » Thu Jan 05, 2017 9:56 am

Filtering can add the distressed and old paper feel as well.

Bit sloppy example here.

Can you point to a source image with the exact look?

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Thu Jan 05, 2017 10:52 am

Raspi wrote:Changing the text is not a big deal: i can see three different fonts and a text on path effect.

I did a bit of reasearch:
the serif font is Clarendon Bold Condensed
the calligraphic looking font is: Script MT Std Bold
No idea about the text on a path, but it should be easy finding a substitute.

Both fonts are commercial fonts, but there are similar looking free versions.

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 10:56 am

Raspi wrote:You do realize your poster is probably a rip off of the Jim Beam bottle, right ?

Raspi I was going to ask if you could upload a yellow version of your green whisky :? but if you feel uncomfortable uploading additional content to this thread I understand.

I'm uploading Raspi's green Whisky with corrected padding. This 1093px version is the one I'll be working on if anyone is interested. And I would greatly appreciate a YELLOW version since I'm going to be working in parchment/sand.

WHISKY GREEN 1093px.png
WHISKY GREEN 1093px.png (90.32 KiB) Viewed 4184 times

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Raspi » Thu Jan 05, 2017 11:00 am

vector.rex wrote:Raspi I was going to ask if you could upload a yellow version of your green whisky :? but if you feel uncomfortable uploading additional content to this thread I understand.

You can do that on your own.
Release the mask, change the colour of the rectanlges to whatever you want, re-apply the mask.

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 11:02 am

Raspi wrote:Making the poster look distressed is even easier with IS 0.92, now that we have new Blendmodes.

Raspi I'm sorry I didn't catch this. You're referring to . . . :?:

Lazur I'm on it right now. And I just remembered I've even got some bullet holes lying around. :mrgreen:

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Thu Jan 05, 2017 11:22 am

Tons of examples Lazur! The one thing all these images share in common is the almost total absence of WHITE.

Image

Image

Image

Image

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Lazur » Thu Jan 05, 2017 1:25 pm

Another sloppy attempt:

Image

svg source

Detail level can be as much as one likes although the rendering speed will get to a point where you better switch it off for editing if you added too many blurring and turbulences.

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Fri Jan 06, 2017 10:01 am

Lazur wrote:Another sloppy attempt.

I think it looks fine Lazur. It's very dignified. Okay I'm uploading two images: One is an extremely nice edge-distressed parchment background, and the other . . . well I did say I'm not an artist!! :mrgreen: I'm not pleased with my edit but I welcome anyone improving upon it. Sorry for the format (I couldn't get them uploaded).

WHISKY_99.jpg
WHISKY_99.jpg (202.41 KiB) Viewed 4092 times


PARCH DISTRESSED_99.jpg
PARCH DISTRESSED_99.jpg (102.74 KiB) Viewed 4092 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby Moini » Fri Jan 06, 2017 11:34 am

Somehow, the parchment edges aren't cut off correctly. I would try with gimp and set a fade-out radius when cutting out the selection to get rid of the white border.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
vector.rex
Posts: 27
Joined: Sat Feb 21, 2015 1:18 pm

Re: Assign HUE to the heavily-aliased text of a raster PNG

Postby vector.rex » Fri Jan 06, 2017 12:17 pm

Moini wrote:Somehow, the parchment edges aren't cut off correctly. I would try with gimp and set a fade-out radius when cutting out the selection to get rid of the white border.

Thank you Moini! Just noticed that . . .


Return to “Help with using Inkscape”