Re: [Flightgear-devel] OT: Gimp and small textures

2003-04-03 Thread Martin Dressler
On Wed 2. April 2003 19:07, you wrote:
 But are you starting with an image of 1024x1024 or higher?  If you try
 to edit at the final resolution, you really can't avoid seeing
 aliasing artifacts.  Everything has to be done in a giant buffer and
 then downsampled as the very last step.
I am starting at 512x512 so downsample 4x. I draw lines with antialiasing on.

  I have one more question. Is it posible and how to specify color in
  postscript by RGB components?

 Sure:

 0 0 1 setrgbcolor

 ...will set the drawing color to pure blue.  The numbers are floating
 point in the range 0-1.  Postscript color space handling gets obtusely
 complicated, but this one does what most programmers expect and is
 especially useful for situations like this where the only display
 device is a bitmapped RGB image.

 And yes, the arguments come before the function.  Postscript is a
 postfix stack language like forth. :)

 Andy

Thanks,
Madr


-- 
  Martin Dressler

e-mail: [EMAIL PROTECTED]
http://www.musicabona.com/

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] OT: Gimp and small textures

2003-04-02 Thread Gerhard Wesp
 I have one more question. Is it posible and how to specify color in 
 postscript by RGB components?

Have you looked at the language specification?  

  http://partners.adobe.com/asn/developer/pdfs/tn/PLRM.pdf

In case it's not in the core language, it should be trivial to define
your own command.

-Gerhard
-- 
| voice: +43 (0)676 6253725  ***  web: http://www.cosy.sbg.ac.at/~gwesp/
|
| Passts auf, seid's vuasichdig, und lossds eich nix gfoin!
|  -- Dr. Kurt Ostbahn

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] OT: Gimp and small textures

2003-04-02 Thread Andy Ross
Martin Dressler wrote:
 So it mean that gimp use bad antialiasing or render lines in some
 bad way.  Because Gimp scale with the same quality as ImageMagic.

But are you starting with an image of 1024x1024 or higher?  If you try
to edit at the final resolution, you really can't avoid seeing
aliasing artifacts.  Everything has to be done in a giant buffer and
then downsampled as the very last step.

 I have one more question. Is it posible and how to specify color in
 postscript by RGB components?

Sure:

0 0 1 setrgbcolor

...will set the drawing color to pure blue.  The numbers are floating
point in the range 0-1.  Postscript color space handling gets obtusely
complicated, but this one does what most programmers expect and is
especially useful for situations like this where the only display
device is a bitmapped RGB image.

And yes, the arguments come before the function.  Postscript is a
postfix stack language like forth. :)

Andy

-- 
Andrew J. RossBeyond the OrdinaryPlausibility Productions
Sole Proprietor   Beneath the Infinite   Hillsboro, OR
  Experience... the Plausible?



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] OT: Gimp and small textures

2003-04-01 Thread Martin Dressler
On Mon 31. March 2003 19:53, you wrote:
 Martin Dressler wrote:
  I made some investigations in last days and find why my textures look
  so bad when scaled down to 128x128 textures compared to textures
  generated by perl scripts (writen by Andy?)

 Uh, once upon a time, yeah.  They're terrible hacks; not exactly my
 best work. :)
But works good, I only don't like, that it is perl :o)


  The problem isn't in scaling, because these scripts scale down too,
  but the diference is in how gimp render lines and ghostscript render
  lines.

 No, it's the scaling.  Ghostscript doesn't do antialiasing at all, it
 just colors whole pixels.  The scripts use gs to rasterize the image
 at 4x (or even 16x, to get the whole 8 bit gray range) resolution and
 then downsample to the target resolution using ImageMagick's mogrify
 program.
So it mean that gimp use bad antialiasing or render lines in some bad way.
Because Gimp scale with the same quality as ImageMagic.


  Is it posibble to change these scripts to produce dials with fully
  transparent background, or give them some texture to render on it.

 The original scripts hack in alpha by using a chroma key.  If you draw
 anything in pure blue (I think), it'll come out transparent.  This
 actually exploits Ghostscript's inability to do sub-pixel rendering.
 I think the alpha stuff was actually done with a tiny C program, but I
 forget. :)
A tiny perl program.

So if I delete background, It will render in white on pure blue and after 
scale down I will get transparent layer with white lines only. It is exactly 
what i wanted.

I have one more question. Is it posible and how to specify color in 
postscript by RGB components?

Thank,
Madr


-- 
  Martin Dressler

e-mail: [EMAIL PROTECTED]
http://www.musicabona.com/

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] OT: Gimp and small textures

2003-03-31 Thread Martin Dressler
Hi,
 I made some investigations in last days and find why my textures look so bad 
when scaled down to 128x128 textures compared to textures generated by perl 
scripts (writen by Andy?) The problem isn't in scaling, because these scripts 
scale down too, but the diference is in how gimp render lines and ghostscript 
render lines. The text looks same when rendered with freetype library. I 
don't want to throw out the posibility to draw on texture. 

 Is it posibble to change these scripts to produce dials with fully 
transparent background, or give them some texture to render on it.

Thanks,
Madr

-- 
  Martin Dressler

e-mail: [EMAIL PROTECTED]
http://www.musicabona.com/

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] OT: Gimp and small textures

2003-03-31 Thread Andy Ross
Martin Dressler wrote:
 I made some investigations in last days and find why my textures look
 so bad when scaled down to 128x128 textures compared to textures
 generated by perl scripts (writen by Andy?)

Uh, once upon a time, yeah.  They're terrible hacks; not exactly my
best work. :)

 The problem isn't in scaling, because these scripts scale down too,
 but the diference is in how gimp render lines and ghostscript render
 lines.

No, it's the scaling.  Ghostscript doesn't do antialiasing at all, it
just colors whole pixels.  The scripts use gs to rasterize the image
at 4x (or even 16x, to get the whole 8 bit gray range) resolution and
then downsample to the target resolution using ImageMagick's mogrify
program.

 Is it posibble to change these scripts to produce dials with fully
 transparent background, or give them some texture to render on it.

The original scripts hack in alpha by using a chroma key.  If you draw
anything in pure blue (I think), it'll come out transparent.  This
actually exploits Ghostscript's inability to do sub-pixel rendering.
I think the alpha stuff was actually done with a tiny C program, but I
forget. :)

Alternatively, you can take the gray scale texture and use it as an
alpha channel underneath pure white (or black).  That will get you the
effect you want.  If gimp can't do this, you can write a really
trivial C program to turn the grayscale image into a raw RGBA file,
thence to a .png or whatnot using ImageMagick.

Andy

-- 
Andrew J. RossBeyond the OrdinaryPlausibility Productions
Sole Proprietor   Beneath the Infinite   Hillsboro, OR
  Experience... the Plausible?



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel