OpenLayers OpenLayers

Ticket #650 (closed feature: fixed)

Opened 1 year ago

Last modified 11 months ago

Default image foramt to not-jpg for transparent images

Reported by: crschmidt Assigned to: tschaub
Priority: minor Milestone: 2.5 Release
Component: Layer.WMS Version:
Keywords: Cc:
State:

Description

transparent wms images should not be jpegs, since jpegs can't be transparent. This was originally reported by cameronshorter, who I forgot to open the ticket on behalf of.

Attachments

wms.patch (2.6 kB) - added by crschmidt on 06/17/07 10:11:01.
wms2.patch (5.1 kB) - added by euzuro on 06/25/07 16:49:49.
slight rearranging of the logic for this patch, since the two tests were checking for transparency, using that instead.

Change History

06/17/07 10:11:01 changed by crschmidt

  • attachment wms.patch added.

06/17/07 10:12:11 changed by crschmidt

  • keywords set to review.

If a layer is marked transparent, we should try to help the user out by making it transparent for them. This patch adds logic in initialize that changes image/jpeg to either image/png, or, if in IE, image/gif.

Includes tests.

06/22/07 16:09:09 changed by camerons

For completeness, this is a duplicate of http://trac.openlayers.org/ticket/423

06/25/07 16:49:49 changed by euzuro

  • attachment wms2.patch added.

slight rearranging of the logic for this patch, since the two tests were checking for transparency, using that instead.

06/25/07 16:51:50 changed by euzuro

doh. funky keyboard hit return on accident. wms2 patch moves logic around a little but has the same effect, only one minor change: TRuE now registers as true for the automatic baselayer/overlay determination. If we'll do it for the image format might as well do it for that as well... right? so i changed one test to accomodate that.

other major change here is adding same logic to WMS/Untiled.js

for the love of sanity, we need to make a real, bonified Untiled/Grid distinction. That is on my *very* short list.

06/27/07 21:45:52 changed by crschmidt

I'm okay with this, but would like buy-in from Tim because he expressed concern about too much magic. This magic is the kind that we've had users ask for, and is pretty easy to override, but at the same time, it's not something I want to go ahead with without approval from Tim.

07/02/07 16:35:23 changed by euzuro

  • owner set to tschaub.

07/02/07 17:12:25 changed by tschaub

  • keywords changed from review to commit.

I think the test messages should say

"transparent = TRuE causes non-image/jpeg format"

instead of

"transparent = TRuE causes image/gif format"

or test explicitly for non-jpeg and then make sure the alphaHack logic is followed, but that is just because it is easy to be picky when you're not the one writing tests.

Thanks for applying the magic.

07/02/07 18:18:11 changed by euzuro

  • status changed from new to closed.
  • resolution set to fixed.

patch modified and applied. r3554

07/05/07 16:54:15 changed by euzuro

  • keywords deleted.