diff --git a/pixelhouse/_version.py b/pixelhouse/_version.py index 08aa3d8..1819c28 100644 --- a/pixelhouse/_version.py +++ b/pixelhouse/_version.py @@ -1,6 +1,7 @@ -__version__ = "0.5.3" +__version__ = "0.5.4" """ +Version: 0.5.4: Loaded images are now fully opaque Version: 0.5.3: Show and resize now return self for chaining Version: 0.5.2: Add canvas init from image and setters from scalars Version: 0.5.1: Add canvas.rgb getter/setter to quickly get non-alpha img diff --git a/pixelhouse/canvas.py b/pixelhouse/canvas.py index cbd08cf..e1bf155 100644 --- a/pixelhouse/canvas.py +++ b/pixelhouse/canvas.py @@ -439,9 +439,9 @@ def load(self, filename): # Read the image in and convert to RGB space img = cv2.imread(filename, cv2.IMREAD_UNCHANGED) - # If needed, add in an alpha channel + # If needed, add in an alpha channel as fully opaque if img.shape[2] == 3: - alpha = np.zeros_like(img[:, :, 0]) + alpha = 255*np.ones_like(img[:, :, 0]) img = np.dstack((img, alpha)) self.img = cv2.cvtColor(img, cv2.COLOR_BGRA2RGBA)