Post Reply 

Create subpixel rendering of monochrome clipart

Jan 23, 2012, 00:17 (This post was last modified: Jan 23, 2012 00:41 by ofnuts.)
Post: #1
Create subpixel rendering of monochrome clipart
Hey guys, I just registered here to ask a question that must have a fairly doable solution.

I want to use a monochrome image to create a (1/3 size) image with subpixel precision. For starters, a pure black&White clipart seems the easiest to do this with. But after toying around some I couldn't find or think of a proper way to do this.

I'd love to hear your ideas on this! Maybe even a method to convert greyscale-antialiased images to 1/3 sized subpixel antialiased ones?

Oh, for your amusement here's what I tried so far:
- Scaled the vertical resolution to 1/3
- Created 3 copies offset by 0, 1 and 2 pixels respectively for use in the next step
- Masked out 2 in every 3 colums of pixels leaving R, G and B striped versions.
- Scaled striped component images to 1/3 horizontal resolution
(no interpolation, aligned so that it uses exacly the desired 1 in 3 colored pixels)
- Got stuck with three seperate R, G and B colored component images...
- Posted this question

Also, attached is an intermediate result of my efforts: the combination of the three striped R, G and B versions. Simply scaling the attached image unfortunately does not yield the desired (and expected) result.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Jan 23, 2012, 00:48
Post: #2
RE: Create subpixel rendering of monochrome clipart
(Jan 23, 2012 00:17)Schop Wrote:  Hey guys, I just registered here to ask a question that must have a fairly doable solution.

I want to use a monochrome image to create a (1/3 size) image with subpixel precision. For starters, a pure black&White clipart seems the easiest to do this with. But after toying around some I couldn't find or think of a proper way to do this.

I'd love to hear your ideas on this! Maybe even a method to convert greyscale-antialiased images to 1/3 sized subpixel antialiased ones?

Oh, for your amusement here's what I tried so far:
- Scaled the vertical resolution to 1/3
- Created 3 copies offset by 0, 1 and 2 pixels respectively for use in the next step
- Masked out 2 in every 3 colums of pixels leaving R, G and B striped versions.
- Scaled striped component images to 1/3 horizontal resolution
(no interpolation, aligned so that it uses exacly the desired 1 in 3 colored pixels)
- Got stuck with three seperate R, G and B colored component images...
- Posted this question

Also, attached is an intermediate result of my efforts: the combination of the three striped R, G and B versions. Simply scaling the attached image unfortunately does not yield the desired (and expected) result.
No surprise, there are is round off involved in the scaling down.

Possible solution:
- create your symbol as a path
- make three copies, and shift them the appropriate amount (in paths, point coordinates are floating point values, you can have a sub-pixels shift)
- decompose image to RGB, and in each layer, set selection from relevant path and bucket-fill
- recompose image
.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jan 23, 2012, 05:11 (This post was last modified: Jan 23, 2012 05:13 by Schop.)
Post: #3
RE: Create subpixel rendering of monochrome clipart
(Jan 23, 2012 00:48)ofnuts Wrote:  
(Jan 23, 2012 00:17)Schop Wrote:  ...
No surprise, there are is round off involved in the scaling down.

Possible solution:
- create your symbol as a path
- make three copies, and shift them the appropriate amount (in paths, point coordinates are floating point values, you can have a sub-pixels shift)
- decompose image to RGB, and in each layer, set selection from relevant path and bucket-fill
- recompose image
.

If The GIMP works with the RGB values directly there shouldn't be rounding problems like the one in the attachment... I think. Could someone maybe explain that? I may be assuming wrong facts about gimp in my thinking :(

Anyway, I just Googled what paths are, heh, and I guess I forgot to mention I got that image off the internet. So my question is less about how to create subpixel rendered images and more about how to (manually) convert an existing raster image to one. Also, I know lots of existing algorithms are better than I will ever be, but I'm interested in learning about this!

Nonetheless, I will try creating some nice symbol myself using your method.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Jan 24, 2012, 16:25
Post: #4
RE: Create subpixel rendering of monochrome clipart
(Jan 23, 2012 05:11)Schop Wrote:  Nonetheless, I will try creating some nice symbol myself using your method.

Well, i did. And I can't figure out how to shift a path by a floating point value, just by dragging with the move tool... Could you point me to a dialogue where I can just key in a number? Tnx!
Find all posts by this user
Quote this message in a reply
Jan 24, 2012, 21:03
Post: #5
RE: Create subpixel rendering of monochrome clipart
Writing a script for that is a smop Smile I may write one, but I already have a couple in the queue. Pray that I get invited to more boring meetings Smile

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jan 26, 2012, 00:32
Post: #6
RE: Create subpixel rendering of monochrome clipart
Check out path-shift:

Doc: http://gimp-path-tools.sourceforge.net/tools.shtml
Script: http://sourceforge.net/projects/gimp-pat...s/scripts/

Enjoy and report your findings.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jan 26, 2012, 01:16
Post: #7
RE: Create subpixel rendering of monochrome clipart
(Jan 26, 2012 00:32)ofnuts Wrote:  Check out path-shift:

Doc: http://gimp-path-tools.sourceforge.net/tools.shtml
Script: http://sourceforge.net/projects/gimp-pat...s/scripts/

Enjoy and report your findings.

Thanks! Couldn't have figured I had to look outside of Gimp itself for a subpixel shift of paths :s
Unfortunately I will have to try after the bussy weekend though. I'll keep you updated.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  how to create logo for watermark purpose? kenny1999 5 417 Sep 24, 2014 18:16
Last Post: kenny1999
Question How to create a cloud from a photo? feny.be 2 298 Sep 24, 2014 17:29
Last Post: feny.be
  Create new images button & Save as override from Script-fu beniman 12 558 Sep 10, 2014 10:57
Last Post: paynekj
  Create a flat shadow or long shadow flatpp 3 505 Sep 3, 2014 12:42
Last Post: rich2005
  Rendering courtney26 3 319 Aug 6, 2014 17:45
Last Post: caz

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS