[mapserver-users] geotiff resampling and transparency - artifact problem
Oliver Christen
oliver.christen at camptocamp.com
Fri Apr 26 06:54:08 PDT 2013
Hello Tomas
as far as I can see the tiff are already in RGBA, from what I can see
from the gdalinfo (see below)
I tried using OFFSITE, but I couldnt see any difference in the output
with or without it.
In my opinion something is going wrong in the image treatments when a
resampling is applied, as if the alpha transparency value for the border
pixels was not preserved during the processing.
but then that's pure speculation.
Warning 1: TIFFReadDirectory:Unknown field with tag 37724 (0x935c)
encountered
Driver: GTiff/GeoTIFF
Files: 592116.tif
592116.tfw
Size is 5020, 5020
Coordinate System is `'
Origin = (2591997.899999999906868,1117002.100000000093132)
Pixel Size = (0.200000000000000,-0.200000000000000)
Metadata:
TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows
TIFFTAG_DATETIME=2013:04:18 14:52:47
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 2591997.900, 1117002.100)
Lower Left ( 2591997.900, 1115998.100)
Upper Right ( 2593001.900, 1117002.100)
Lower Right ( 2593001.900, 1115998.100)
Center ( 2592499.900, 1116500.100)
Band 1 Block=5020x1 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=5020x1 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=5020x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=5020x1 Type=Byte, ColorInterp=Alpha
> Hi Oliver,
>
> Are you using mapserver's OFFSITE parameter, and/or do your tiff files
> have a nodata pixel set ?
> What happens if you convert your tiff to 32bit RGBA? (Not suggesting
> this is a valid workaround, just trying to narrow down the reasons for
> this).
>
> --
> thomas
>
>
> On 18 April 2013 15:27, Oliver Christen
> <oliver.christen at camptocamp.com
> <mailto:oliver.christen at camptocamp.com>> wrote:
>
> dear all
>
> Im having some issue when applying PROCESSING "RESAMPLE=AVERAGE"
> or "RESAMPLE=BILINEAR" on some geotiff with transparency.
> Either a clear or dark artifact appears on the border of the
> image, as seen on these examples:
>
> http://dev.camptocamp.com/files/mapserver/fuzzy_edge_AVERAGE.png
> http://dev.camptocamp.com/files/mapserver/fuzzy_edge_BILINEAR.png
>
> if I specify no PROCESSING at all, the transparency is correct
> (but not the image "quality" which I wanted to improve with the
> PROCESSING ):
> http://dev.camptocamp.com/files/mapserver/fuzzy_edge_NOPROCESSING.png
>
> at first I though the problem may have been caused by a fuzzy edge
> on the transparent edges in the geotiff:
> http://dev.camptocamp.com/files/mapserver/fuzzy_edge.png
> so I retreated one image to have clean edges:
> http://dev.camptocamp.com/files/mapserver/clean_edge.png
>
> but I couldnt see much difference in the result:
> http://dev.camptocamp.com/files/mapserver/clean_edge_AVERAGE.png
> http://dev.camptocamp.com/files/mapserver/clean_edge_BILINEAR.png
>
> there is no visible artifact for all border multipe of 90°
> (horizontal and vertical edges), only the non 90° edges show that
> problem.
>
> Im not knowledgeable with image manipulation and resampling with
> transaprency, so I dont know if this is normal or not.
>
> Any idea if there is some way to "solve" this "problem" ?
>
> thank you for your attention
>
> best regards
> Oliver
>
>
>
> --
> Camptocamp SA
> Oliver Christen
> PSE A
> CH-1015 Lausanne
>
> www.camptocamp.com <http://www.camptocamp.com>
>
> +41 21 619 10 23 <tel:%2B41%2021%20619%2010%2023> (direct)
> +41 21 619 10 10 <tel:%2B41%2021%20619%2010%2010> (centrale)
> +41 21 619 10 00 <tel:%2B41%2021%20619%2010%2000> (fax)
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> <mailto:mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
Camptocamp SA
Oliver Christen
PSE A
CH-1015 Lausanne
www.camptocamp.com
+41 21 619 10 23 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130426/e1df6b65/attachment.htm>
More information about the MapServer-users
mailing list