Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1084 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2012-11-25 22:43 +0100 |
| Last post | 2012-11-26 22:15 +0100 |
| Articles | 10 — 2 participants |
Back to article view | Back to comp.lang.postscript
Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 22:43 +0100
Re: Sometimes noise and resources about colours Chris <cjl@spamcop.net> - 2012-11-25 22:03 +0000
Re: Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 23:54 +0100
Re: Sometimes noise and resources about colours Chris <cjl@spamcop.net> - 2012-11-26 09:50 +0000
Re: Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-26 21:43 +0100
Re: Sometimes noise and resources about colours Chris <cjl@spamcop.net> - 2012-11-26 21:00 +0000
Re: Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-26 23:19 +0100
Re: Sometimes noise and resources about colours Chris <cjl@spamcop.net> - 2012-11-26 22:36 +0000
Re: Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-27 00:41 +0100
Re: Sometimes noise and resources about colours Cecil Westerhof <Cecil@decebal.nl> - 2012-11-26 22:15 +0100
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-25 22:43 +0100 |
| Subject | Sometimes noise and resources about colours |
| Message-ID | <87r4nhl5on.fsf@Compaq.site.inet> |
I am dabbling with postscript. I like it, but it take a lot of
time. ;-)
The last 6 graphics at:
https://www.facebook.com/media/set/?set=a.351549161549364.70328.100000828491269
(the first 6 in the list) I made with postscript. But I see some noise
in some of them. How can I circumvent this. At the moment I use ps2pdf
to make an pdf and then convert (from Image Magick) to make a png. I
saw that it is in principal possible to make a png with ghostscript.
Would that give better results.
My second question is about colours. As you can see from the pictures
I am not the worlds greatest graphics designer. What are good
resources to learn about good colour combinations? (Maybe good
resources about typography would not be wrong also.) But for a newbie
of-course. :-D
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-25 22:03 +0000 |
| Message-ID | <tAwss.986215$it2.920768@fx22.am4> |
| In reply to | #1084 |
On Sun, 25 Nov 2012 22:43:20 +0100, Cecil Westerhof wrote: > I am dabbling with postscript. I like it, but it take a lot of time. ;-) > > The last 6 graphics at: > https://www.facebook.com/media/set/? set=a.351549161549364.70328.100000828491269 > > (the first 6 in the list) I made with postscript. But I see some noise > in some of them. How can I circumvent this. At the moment I use ps2pdf > to make an pdf and then convert (from Image Magick) to make a png. I saw > that it is in principal possible to make a png with ghostscript. Would > that give better results. I assume the "noise" you refer to are the "blobs" around the text glyphs. That looks to me like the effects of halftoning, because the output doesn't have enough colours to accurately portray the colours you've used in the Postscript. Using ImageMagick, you almost certainly already are using Ghostscript, but you will have more direct control by calling Ghostscript directly, and you can leave out the ps2pdf step. You can do something like: gs -sDEVICE=png16m -r300 -o <output>.png <input>.ps You can also replace "png16m" with png16, png256, png48, pngalpha, pnggray or pngmono, for different colour fidelities (lower fidelity == smaller file size). The "-r" (resolution) option is something you probably want to read up on. Most of the commonly used Ghostscript options are documented here: http://www.ghostscript.com/doc/9.06/Use.htm Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-25 23:54 +0100 |
| Message-ID | <87ip8tl2do.fsf@Compaq.site.inet> |
| In reply to | #1085 |
Op zondag 25 nov 2012 23:03 CET schreef Chris:
>> I am dabbling with postscript. I like it, but it take a lot of time. ;-)
>>
>> The last 6 graphics at:
>> https://www.facebook.com/media/set/?
> set=a.351549161549364.70328.100000828491269
>>
>> (the first 6 in the list) I made with postscript. But I see some noise
>> in some of them. How can I circumvent this. At the moment I use ps2pdf
>> to make an pdf and then convert (from Image Magick) to make a png. I saw
>> that it is in principal possible to make a png with ghostscript. Would
>> that give better results.
>
> I assume the "noise" you refer to are the "blobs" around the text
> glyphs.
Yes.
> That looks to me like the effects of halftoning, because the output
> doesn't have enough colours to accurately portray the colours you've used
> in the Postscript.
But I am only using two colours.
> Using ImageMagick, you almost certainly already are using Ghostscript,
> but you will have more direct control by calling Ghostscript directly,
> and you can leave out the ps2pdf step.
>
> You can do something like:
> gs -sDEVICE=png16m -r300 -o <output>.png <input>.ps
The first try does not look promising. With the -r300 I get a to big
picture. When I leave it out the size is correct. But I still have the
noise. Also the kerning is wrong. The letters are to close together
now.
The command I am using is:
gs -sDEVICE=png16m -o keepYourHead2.png keepYourHead.ps
The 2 is to keep the file from the other generate to compare them.
The generated files are posted at:
http://decebal.nl/postscript/keepYourHead.png
http://decebal.nl/postscript/keepYourHead2.png
> You can also replace "png16m" with png16, png256, png48, pngalpha, pnggray
> or pngmono, for different colour fidelities (lower fidelity == smaller
> file size). The "-r" (resolution) option is something you probably want
> to read up on.
>
> Most of the commonly used Ghostscript options are documented here:
> http://www.ghostscript.com/doc/9.06/Use.htm
I'll look into them.
By the way, I even see noise in the pdf, but less and only under the
text:
http://decebal.nl/postscript/keepYourHead.pdf
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-26 09:50 +0000 |
| Message-ID | <rXGss.608752$A%.494054@fx26.am4> |
| In reply to | #1087 |
On Sun, 25 Nov 2012 23:54:43 +0100, Cecil Westerhof wrote: > Op zondag 25 nov 2012 23:03 CET schreef Chris: > >> That looks to me like the effects of halftoning, because the output >> doesn't have enough colours to accurately portray the colours you've >> used in the Postscript. > > But I am only using two colours. This really isn't the place to give a treatise on colour representation but..... in a very simplified form...... For line-art Postscript/PDF (mostly) use a floating point number to represent tint values (for example, individual tints of Red, Green and Blue). That give an (effectively) continuous range of values from no ink to "full" ink, and everything in-between. Computer image files (almost always), however, represent colour tints as integer values, meaning that the range from no ink to full ink is represented as a series of discrete steps. With enough of those steps, the human eye cannot discern differences between adjacent values, and the result is good enough to be referred to as "continuous tone" - the "enough steps" is usually 255 (or 256 discrete values), meaning each colour tint is represented by an 8 bit value. Using the above "8 bit" representation, the image output can accurately represent the Postscript input. There are formats, however, that sacrifice colour fidelity in return for a smaller file size. These might use only 16 values (represented by 4 bits), or even less. Using these lower fidelity formats, Ghostscript will try to select the nearest available tint to the one requested, then may use halftoning to try to better emulate the actual requested tint value. It doesn't matter that you "only used two colours", unless both those colours fell exactly on a tint value representable in the output format, you may get a halftoning effect. Note that there are also formats that use a colour palette to reduce the number of bits required to represent colours (thus reducing file sizes) whilst reducing (to a point) the impact on the colour quality. I will leave it to you to read up on those if you are interested..... >> >> You can do something like: >> gs -sDEVICE=png16m -r300 -o <output>.png <input>.ps > > The first try does not look promising. With the -r300 I get a to big > picture. When I leave it out the size is correct. Well, I did say you should read up on the Ghostscript options - *especially* "-r". The size is "correct" in both cases. > But I still have the > noise. Also the kerning is wrong. The letters are to close together now. The kerning is not wrong. You've asked for 72 dpi (that's Ghostscript's default resolution), that severely limits the accuracy with which we can place glyphs, and features within glyphs, and what you're seeing is the result of that. As with colours, Postscript provides a continuous plane in "user space" which the interpreter must convert to a discrete coordinate space for the image file output, using a specific set of rules (scan conversion). The lower the resolution, the greater error you can expect during that conversion. > The command I am using is: > gs -sDEVICE=png16m -o keepYourHead2.png keepYourHead.ps > > The 2 is to keep the file from the other generate to compare them. > > The generated files are posted at: > http://decebal.nl/postscript/keepYourHead.png > http://decebal.nl/postscript/keepYourHead2.png I don't see any "noise" in those. I do see that that the first one looks like it is anti-aliased (hence the slight fuzziness around the glyphs), whilst the second is not. If you want anti-aliased output direct from Ghostscript, lookup the TextAlphaBits and GraphicsAlphaBits command line options. Perhaps you could indicate where you see the noise? <SNIP> > > By the way, I even see noise in the pdf, but less and only under the > text: > http://decebal.nl/postscript/keepYourHead.pdf Again, I don't see any noise in that, using evince/poppler, xpdf, Ghostscript and Acrobat. Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-26 21:43 +0100 |
| Message-ID | <87d2z0ksci.fsf@Compaq.site.inet> |
| In reply to | #1088 |
Op maandag 26 nov 2012 10:50 CET schreef Chris:
>>> That looks to me like the effects of halftoning, because the output
>>> doesn't have enough colours to accurately portray the colours you've
>>> used in the Postscript.
>>
>> But I am only using two colours.
>
> This really isn't the place to give a treatise on colour representation
> but..... in a very simplified form......
You went a lot deeper as I mend. ;-) I just mend which colour
combinations to use. Until now I like yellow on darkblue. Yellow on
red is not to bad also, but should not be used to much I think. My
other experiments do not make me happy until now. :-(
>>> You can do something like:
>>> gs -sDEVICE=png16m -r300 -o <output>.png <input>.ps
>>
>> The first try does not look promising. With the -r300 I get a to big
>> picture. When I leave it out the size is correct.
>
> Well, I did say you should read up on the Ghostscript options -
> *especially* "-r". The size is "correct" in both cases.
Not when I put an picture on FaceBook and it is not allowed to be
wider as 404 pixels.
>> But I still have the
>> noise. Also the kerning is wrong. The letters are to close together now.
>
> The kerning is not wrong. You've asked for 72 dpi (that's Ghostscript's
> default resolution), that severely limits the accuracy with which we can
> place glyphs, and features within glyphs, and what you're seeing is the
> result of that.
Then I properly best can make a PDF first and convert that to an png.
I had the same with eps files. You can immediately convert them with
convert, but get a very bad result.
> As with colours, Postscript provides a continuous plane in "user space"
> which the interpreter must convert to a discrete coordinate space for the
> image file output, using a specific set of rules (scan conversion). The
> lower the resolution, the greater error you can expect during that
> conversion.
>
>> The command I am using is:
>> gs -sDEVICE=png16m -o keepYourHead2.png keepYourHead.ps
>>
>> The 2 is to keep the file from the other generate to compare them.
>>
>> The generated files are posted at:
>> http://decebal.nl/postscript/keepYourHead.png
>> http://decebal.nl/postscript/keepYourHead2.png
>
> I don't see any "noise" in those. I do see that that the first one looks
> like it is anti-aliased (hence the slight fuzziness around the glyphs),
> whilst the second is not. If you want anti-aliased output direct from
> Ghostscript, lookup the TextAlphaBits and GraphicsAlphaBits command line
> options.
I mean the anti-aliasing. And I really see it in both. I do not want
anti-aliasing. I'll look into the commands you gave. The option
+antialias with convert does not work very well. When converting from
the pdf there is already some fuzziness. So I should find a way to
prevent it cropping up in the pdf.
>> By the way, I even see noise in the pdf, but less and only under the
>> text:
>> http://decebal.nl/postscript/keepYourHead.pdf
>
> Again, I don't see any noise in that, using evince/poppler, xpdf,
> Ghostscript and Acrobat.
If you look under the letters, there is a little shadow.
I do not see fuzziness at:
https://www.facebook.com/photo.php?fbid=445065655531047
The only problem is: I do not have the used script anymore. :-(
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-26 21:00 +0000 |
| Message-ID | <6MQss.277223$g62.79799@fx06.am4> |
| In reply to | #1101 |
On Mon, 26 Nov 2012 21:43:41 +0100, Cecil Westerhof wrote: >>> The generated files are posted at: >>> http://decebal.nl/postscript/keepYourHead.png >>> http://decebal.nl/postscript/keepYourHead2.png >> >> I don't see any "noise" in those. I do see that that the first one >> looks like it is anti-aliased (hence the slight fuzziness around the >> glyphs), whilst the second is not. If you want anti-aliased output >> direct from Ghostscript, lookup the TextAlphaBits and GraphicsAlphaBits >> command line options. > > I mean the anti-aliasing. And I really see it in both. I do not want > anti-aliasing. I'll look into the commands you gave. The option > +antialias with convert does not work very well. When converting from > the pdf there is already some fuzziness. So I should find a way to > prevent it cropping up in the pdf. I don't see any anti-aliasing effects in the second image (keepYourHead2.png), however much I zoom in. Is it possible you're seeing scaling artefacts from the image viewer you are using? >>> By the way, I even see noise in the pdf, but less and only under the >>> text: >>> http://decebal.nl/postscript/keepYourHead.pdf >> >> Again, I don't see any noise in that, using evince/poppler, xpdf, >> Ghostscript and Acrobat. > > If you look under the letters, there is a little shadow. Nope, don't see it. What are you using to view the PDF? > I do not see fuzziness at: > https://www.facebook.com/photo.php?fbid=445065655531047 That image is definitely anti-aliased. If you zoom in a bit, you can clearly see the outline "softening" around the characters. I suspect the effect is less obvious at normal zoom levels because the glyphs are filled with a shading. Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-26 23:19 +0100 |
| Message-ID | <874nkcknw0.fsf@Compaq.site.inet> |
| In reply to | #1103 |
Op maandag 26 nov 2012 22:00 CET schreef Chris: >>>> The generated files are posted at: >>>> http://decebal.nl/postscript/keepYourHead.png >>>> http://decebal.nl/postscript/keepYourHead2.png >>> >>> I don't see any "noise" in those. I do see that that the first one >>> looks like it is anti-aliased (hence the slight fuzziness around the >>> glyphs), whilst the second is not. If you want anti-aliased output >>> direct from Ghostscript, lookup the TextAlphaBits and GraphicsAlphaBits >>> command line options. >> >> I mean the anti-aliasing. And I really see it in both. I do not want >> anti-aliasing. I'll look into the commands you gave. The option >> +antialias with convert does not work very well. When converting from >> the pdf there is already some fuzziness. So I should find a way to >> prevent it cropping up in the pdf. > > I don't see any anti-aliasing effects in the second image > (keepYourHead2.png), however much I zoom in. Is it possible you're seeing > scaling artefacts from the image viewer you are using? Yep, sorry for the noise. :-( >>>> By the way, I even see noise in the pdf, but less and only under the >>>> text: >>>> http://decebal.nl/postscript/keepYourHead.pdf >>> >>> Again, I don't see any noise in that, using evince/poppler, xpdf, >>> Ghostscript and Acrobat. >> >> If you look under the letters, there is a little shadow. > > Nope, don't see it. What are you using to view the PDF? Adobe reader, but when I increased the zoom to 6400% there was nothing. So adobe put me on the wrong leg I am afraid. >> I do not see fuzziness at: >> https://www.facebook.com/photo.php?fbid=445065655531047 > > That image is definitely anti-aliased. If you zoom in a bit, you can > clearly see the outline "softening" around the characters. I suspect the > effect is less obvious at normal zoom levels because the glyphs are > filled with a shading. So in future I should use shading. :-D Well, I have some experimenting to do. As if I do not have enough to do. :-P Thank you for your patience. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Chris <cjl@spamcop.net> |
|---|---|
| Date | 2012-11-26 22:36 +0000 |
| Message-ID | <V9Sss.280032$g62.249628@fx06.am4> |
| In reply to | #1106 |
On Mon, 26 Nov 2012 23:19:59 +0100, Cecil Westerhof wrote: >> >> Nope, don't see it. What are you using to view the PDF? > > Adobe reader, but when I increased the zoom to 6400% there was nothing. > So adobe put me on the wrong leg I am afraid. Acrobat defaults to using "smoothing" which may well account for what you saw. If you go to Edit->Preferences, and look at the "Page Display" section, there are options for "Smooth Text", "Smooth Line Art" and "Smooth Images", and those are all the anti-aliasing options. Personally, I prefer at least the text and line art smoothing completely disabled. In general, I disable all the smoothing - you really don't want anti-aliasing for proofing purposes! <SNIP> > Thank you for your patience. Glad to help (at least a little!). Chris
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-27 00:41 +0100 |
| Message-ID | <87zk24j5j9.fsf@Compaq.site.inet> |
| In reply to | #1107 |
Op maandag 26 nov 2012 23:36 CET schreef Chris: >>> Nope, don't see it. What are you using to view the PDF? >> >> Adobe reader, but when I increased the zoom to 6400% there was nothing. >> So adobe put me on the wrong leg I am afraid. > > Acrobat defaults to using "smoothing" which may well account for what you > saw. If you go to Edit->Preferences, and look at the "Page Display" > section, there are options for "Smooth Text", "Smooth Line Art" and > "Smooth Images", and those are all the anti-aliasing options. > > Personally, I prefer at least the text and line art smoothing completely > disabled. In general, I disable all the smoothing - you really don't want > anti-aliasing for proofing purposes! I disabled all and even restarted adobe. It is less, but I still see a hint. Well, at least I now know it is not there. :-D -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [next] | [standalone]
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2012-11-26 22:15 +0100 |
| Message-ID | <878v9okqvo.fsf@Compaq.site.inet> |
| In reply to | #1101 |
Op maandag 26 nov 2012 21:43 CET schreef Cecil Westerhof: >>> By the way, I even see noise in the pdf, but less and only under the >>> text: >>> http://decebal.nl/postscript/keepYourHead.pdf >> >> Again, I don't see any noise in that, using evince/poppler, xpdf, >> Ghostscript and Acrobat. > > If you look under the letters, there is a little shadow. I was wrong. It was a display problem. A strange one, but still. I just displayed the document at 6400% and then there is no shadow. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web