Skip to content

Commit

Permalink
more python3 proof
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@10410 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 23, 2015
1 parent d77e1af commit 292dee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/server/picture_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def argb_swap(image, rgb_formats, supports_transparency):
log("argb_swap: bgra_to_rgb for %s on %s", pixel_format, type(pixels))
image.set_pixels(bgra_to_rgb(pixels))
image.set_pixel_format("RGB")
image.set_rowstride(rs/4*3)
image.set_rowstride(rs*3//4)
return True
if pixel_format in ("XRGB", "ARGB"):
if supports_transparency and "RGBA" in rgb_formats:
Expand All @@ -178,7 +178,7 @@ def argb_swap(image, rgb_formats, supports_transparency):
log("argb_swap: argb_to_rgb for %s on %s", pixel_format, type(pixels))
image.set_pixels(argb_to_rgb(pixels))
image.set_pixel_format("RGB")
image.set_rowstride(rs/4*3)
image.set_rowstride(rs*3//4)
return True
warn_encoding_once(pixel_format+"-format-not-handled", "no matching argb function: cannot convert %s to one of: %s" % (pixel_format, rgb_formats))
return False
Expand Down

0 comments on commit 292dee1

Please sign in to comment.