Skip to content

Commit

Permalink
#3826 honour png/P
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Apr 21, 2023
1 parent 29a2ba3 commit c5c8a10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/server/window/window_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def update_encoding_selection(self, encoding=None, exclude=(), init=False):
raise Exception("no common encodings found (server: %s vs client: %s, excluding: %s)" % (
csv(self._encoders.keys()), csv(self.core_encodings), csv(exclude)))
#ensure the encoding chosen is supported by this source:
if (encoding in self.common_encodings or encoding in ("auto", "grayscale")) and len(self.common_encodings)>1:
if (encoding in self.common_encodings or encoding in ("auto", "grayscale", "png/P")) and len(self.common_encodings)>1:
self.encoding = encoding
else:
self.encoding = self.common_encodings[0]
Expand Down Expand Up @@ -962,7 +962,7 @@ def get_best_encoding_impl(self):
if self.encoding=="png/L":
#(png/L would look awful if we mixed it with something else)
return self.encoding_is_pngL
if self.image_depth==8:
if self.image_depth==8 or self.encoding=="png/P":
#limited options:
if self.encoding=="grayscale":
assert "png/L" in self.common_encodings
Expand Down

0 comments on commit c5c8a10

Please sign in to comment.