Anti Aliasing

Pericles S. Nacionales naci0002 at UMN.EDU
Tue May 16 05:41:49 PDT 2006


Get rid of the OUTPUTFORMAT object and just add IMAGETYPE PNG24.  See 
what happens.

-Perry

Zhonghai Wang wrote:
> Hi, Jacob,
>  
> you mean like this:
>  
> *****output format:
>  
> OUTPUTFORMAT
>     NAME "PNG24"
>     MIMETYPE "image/PNG"
>     DRIVER "GD/PNG"
>     EXTENSION "PNG"
>     IMAGEMODE RGBA
>     #TRANSPARENT ON
>     #TRANSPARENCY ALPHA
>   END
>  
> ******layer definition:
> LAYER
>     NAME "railway"
>     STATUS DEFAULT
>     TYPE LINE
>     CONNECTIONTYPE OGR
>     CONNECTION "CA_NAV_RAILRDS.TAB"
>     MAXSCALE 8000
>     SYMBOLSCALE 4000
>     TRANSPARENCY ALPHA
>     PROJECTION
>       "init=epsg:4326"
>     END
>     CLASS
>       NAME "railway"
>       STYLE
>         SYMBOL 'point'
>         COLOR 0 0 0
>         SIZE 5
>         MINSIZE 1
>         MAXSIZE 5
>         ANTIALIAS TRUE
>       END
>       STYLE
>         SYMBOL "dashedline"
>         COLOR 255 255 255
>         SIZE 3
>         MINSIZE 0
>         MAXSIZE 3
>         ANTIALIAS TRUE
>       END   
>     END
>  
> **
>  
> if all the definition is right, this function does not really make the 
> output image nicer. and I've noticed that ANTIALIAS TRUE/FALSE is only 
> useful for truetype font, but not for line features, which means only 
> for truetype font symbols. or Did I do anything wrong?
> 
>  
> On 5/16/06, *Delfos, Jacob* <Jacob.Delfos at maunsell.com 
> <mailto:Jacob.Delfos at maunsell.com>> wrote:
> 
>     Zhonghai,
> 
>     PNG is 8bit, PNG24 is 24bit colour, with an 8bit transparency. So for
>     the ALPHA option, I think you need PNG24. Try this definition:
> 
>     OUTPUTFORMAT
>       NAME PNG24
>       DRIVER "GD/PNG"
>       MIMETYPE "image/png"
>       EXTENSION PNG
>       IMAGEMODE RGBA
>     END
> 
>     Then put:
> 
>     TRANSPARENCY ALPHA
> 
>     in your layer definition (not in OUTPUTFORMAT).
> 
>     regards,
> 
>     Jacob
> 
> 
> 
>     ________________________________
> 
>            From: UMN MapServer Users List
>     [mailto:MAPSERVER-USERS at LISTS.UMN.EDU
>     <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>] On Behalf Of Zhonghai Wang
>            Sent: 16 May 2006 16:14
>            To: MAPSERVER-USERS at LISTS.UMN.EDU
>     <mailto:MAPSERVER-USERS at LISTS.UMN.EDU>
>            Subject: Re: [UMN_MAPSERVER-USERS] Anti Aliasing
> 
> 
>            Hi,
> 
>            I am interested in this question, and I've tried like this:
> 
>            *****
>            OUTPUTFORMAT
>                NAME "PNG"
>                MIMETYPE "image/PNG"
>                DRIVER "GD/PNG"
>                EXTENSION "PNG"
>                IMAGEMODE RGBA
>                TRANSPARENCY ALPHA
>              END
>            *****
>            I've noticed that there is no PNG24 output image format in the
>     mapfile reference document, and therefore I've used PNG.
> 
>            but, I get the followig error message:
> 
>            loadOutputFormat(): Unknown identifier. Parsing error near
>     (TRANSPARENCY):(line 114)
> 
>            which means I caon only use TRANSPARENT as the the identifier as
>     listed in the mapfile reference document, and this parameter can
>     only be
>     truned on or off.
> 
>            any further ideas, Steve?
> 
>            1000 thanks.
> 
>            zhonghai
> 
> 
>            On 5/16/06, ramesh karra <karrarm at yahoo.com
>     <mailto:karrarm at yahoo.com>> wrote:
> 
>                    Hi,
> 
>                    I have added 'ANTIALIAS TRUE' to all my STYLE objects
>                    but I do not see any difference in the map that's
>                    displayed. I was hoping to see smooth lines but there
>                    was no difference in the way lines(representing roads)
>                    are drawn with or without anti-aliasing. Is this the
>                    expected behavior? How can I get smooth lines?
> 
>                    My layer is defined as follows:
> 
>                    LAYER
>                       NAME         roads
>                       DATA         droad1
>                       STATUS       OFF
>                       TYPE         LINE
> 
>                       PROJECTION
>                            "init=epsg:4326"
>                       END
> 
>                       CLASS
>                         NAME       "Roads"
>                         MAXSCALE     80000
>                         MINSCALE     20000
>                         STYLE
>                           ANTIALIAS    TRUE
>                           COLOR        150 150 150
>                           WIDTH        3
>                         END
>                         STYLE
>                           ANTIALIAS    TRUE
>                           COLOR        255 255 255
>                           WIDTH        1
>                         END
>                       END
>                    END
> 
>                    __________________________________________________
>                    Do You Yahoo!?
>                    Tired of spam?  Yahoo! Mail has the best spam protection
>     around
>                    http://mail.yahoo.com
> 
> 
> 
> 



More information about the MapServer-users mailing list