Modify

Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#9984 closed enhancement (fixed)

layer transparency no longer works

Reported by: A_Pirard Owned by: Don-vip
Priority: major Milestone: 14.05
Component: Core imagery Version: tested
Keywords: wms tile png alpha transparency Cc: A_Pirard

Description

I am accessing several WMS servers with &transparency=true
The WMS caches contain transparent .png files.
The Alpha channel option is set.
But the displayed layer is not transparent (it hides the background).
Used to work.

Attachments (3)

51.9 m_52.515_13.392.png (48.7 KB ) - added by A_Pirard 10 years ago.
Screenshot-Java OpenStreetMap Editor-1.png (215.3 KB ) - added by A_Pirard 10 years ago.
Screenshot-Java OpenStreetMap Editor-2.png (452.8 KB ) - added by A_Pirard 10 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Don-vip, 10 years ago

Component: CoreCore imagery
Owner: changed from team to A_Pirard
Status: newneedinfo

Could you please tell us which WMS server are you using, and attach your status report, please? A screenshot would be nice, too.

comment:2 by A_Pirard, 10 years ago

Gladly.
Ah, you mean Help>Show Status Report ;-) See below. System is Ubuntu but Mint packets were added.

wms:http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5?&transparent=true&FORMAT=image/png&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}&LAYERS=0
http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5?&transparent=true&FORMAT=image/png&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&WIDTH=500&HEIGHT=500&BBOX=13.3924751,52.5146453,13.3964303,52.5170522&LAYERS=0

$ pngcheck '51.9 m_52.515_13.392.png'
OK: 51.9 m_52.515_13.392.png (500x500, 24-bit RGB, non-interlaced, 93.4%).

Tile file and two screenshots coming.

Thanks! Best regards.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-04-25 17:49:40
Last Changed Author: Don-vip
Revision: 7000
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-04-25 19:46:38 +0200 (Fri, 25 Apr 2014)
Last Changed Rev: 7000

Identification: JOSM/1.5 (7000 en) Linux Mint 13 Maya
Memory Usage: 213 MB / 1267 MB (103 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Djosm.restart=true, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (30413)
Plugin: PicLayer (30413)
Plugin: RoadSigns (30413)
Plugin: editgpx (30414)
Plugin: geotools (30349)
Plugin: importvec (30413)
Plugin: jts (30277)
Plugin: opendata (30413)
Plugin: osmarender (30413)
Plugin: reltoolbox (30413)
Plugin: reverter (30413)
Plugin: tagging-preset-tester (30413)
Plugin: turnrestrictions (30413)
Plugin: utilsplugin2 (30413)
Last edited 10 years ago by Don-vip (previous) (diff)

by A_Pirard, 10 years ago

Attachment: 51.9 m_52.515_13.392.png added

comment:3 by Don-vip, 10 years ago

Keywords: wms tile png alpha transparency added

comment:4 by Don-vip, 10 years ago

Owner: changed from A_Pirard to team
Status: needinfonew

comment:5 by skyper, 10 years ago

Always thought it is a problem with my WMS source.

comment:6 by Don-vip, 10 years ago

Owner: changed from team to Don-vip
Priority: normalmajor
Status: newassigned
Type: defectenhancement

It's not a defect but a major enhancement to support these files. Java does not offer out-of-the-box support of PNG images defining a transparent color in RGB space (without real alpha channel). If it worked before with this server, then they probably delivered PNG images with alpha channel before, then switched to a different format (maybe for performances).

I have almost finished to implement this, but it's really more difficult than expected.

comment:7 by Don-vip, 10 years ago

Resolution: fixed
Status: assignedclosed

In 7132/josm:

fix #9984 - Add support for WMS tiles defining a transparent color in RGB space (tRNS PNG chunk for example), instead of a proper alpha channel. Surprisingly, Java does not support that out of the box, ImageIO.read always returns opaque images. Allows to switch between this mode and standard mode using WMS layer contextual entry "Use Alpha Channel", for consistency with images defining an alpha channel. Does not impact other images than WMS tiles.

comment:8 by Don-vip, 10 years ago

Milestone: 14.05

comment:9 by A_Pirard, 10 years ago

You guys @ JOSM have an outstanding support that makes me share your enthusiasm and help you the best I can !!!
Answering your question "if it worked before" and explaining my "no longer", this request was not personal but based on:
http://lists.osgeo.org/pipermail/mapproxy/2014-May/001892.html
to which I replied with image analysis (sh.. that pipermail listing HTML source code (save as *.html file and click it))
I didn't guess at all when displaying cached files and running pngcheck that transparency was not alpha.

site (4326) -> JOSM: transparent OK: 51.9 m_52.515_13.392.png
(500x500, 24-bit RGB, non-interlaced, 93.4%).<br>

In fact, I associated a bit too fast a problem with a layer of mine that used to be transparent but was no longer.
Sorry I'm unable to test it right now (server changed). I thought I had a double Mapproxy+JOSM problem.
And now should I say to Mapproxy who didn't reply that JOSM might have debugged their problem too?
Thanks !!! Kudos !!! I should be sleeping ;-)

comment:10 by A_Pirard, 10 years ago

As a side bonus if you like, I often notice with an often non-responding server that JOSM doesn't use its WMS cache.
I mean, if one is returning to previous work when the server no longer responds, that WMS first displays previously cached tiles, that it probably sends requests that time out for the same tiles and that it paints them in red. That's how it looks like.
That is of course frustrating to see that one could but cannot finish some work because of that.
If you think it's easy to fix, feel like doing it and need a careful test and a repeatable procedure, just say it and I'll find some time and open a proper bug.
Cheers.

comment:11 by Don-vip, 10 years ago

Yes, I have seen this behaviour while implementing this ticket but it's not easy to fix. By the way it's already known, look at #7363 and #7682.

comment:12 by Don-vip, 6 years ago

In 13823/josm:

see #9984, see #16047 - Java 11 handles transparent PNG out of the box, disable JOSM mechanisms to force transparency on this version

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.