Galène videoconferencing server discussion list archives
 help / color / mirror / Atom feed
From: Juliusz Chroboczek <jch@irif.fr>
To: galene@lists.galene.org
Subject: [Galene] Background blur on Safari
Date: Sun, 19 Jan 2025 12:11:33 +0100	[thread overview]
Message-ID: <87v7ub5a8q.wl-jch@irif.fr> (raw)

Hi,

I've managed to get background blur to work on Safari.  I've tested on
Safari 18.2 for Mac OS X, I'll be grateful if people could tell me whether
it does the right thing on iOS.

The issue turned out to be Safari bug 198416:

  https://bugs.webkit.org/show_bug.cgi?id=198416

Safari silently ignores the "filter" property of Canvas2D, and therefore
doesn't perform blur when requested.  The result is that Galene would
painstakingly separate the foreground from the background, then fail to
blur the background, and finally recompose the two parts in order to get
what is essentially the original image.

It would probably have been a lot of fun to write a Gaussian blur as
a WebGL shader, I went for something significantly more low-tech: I scale
down the background by a factor of 36, then scale it back up.  While
upscaling, Safari applies what, to my untrained eyes, looks like
a bilinear filter, which yields a fairly acceptable blur.

The code checks for the availability of the "filter" property, not for the
browser version, so Safari users will get proper background blur as soon
as they get a version of Safari with the bug fixed.

Thanks again to Dirk-Willem van Gulik, who loaned me the Mac on which this
work was done.

-- Juliusz


  

             reply	other threads:[~2025-01-19 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-19 11:11 Juliusz Chroboczek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-14 16:28 Juliusz Chroboczek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v7ub5a8q.wl-jch@irif.fr \
    --to=jch@irif.fr \
    --cc=galene@lists.galene.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox