From 22c74f3a8c5725e65f55ab4c677859b33356c7a4 Mon Sep 17 00:00:00 2001
From: Louis Capitanchik <contact@louiscap.co>
Date: Thu, 10 Aug 2023 23:30:10 +0100
Subject: [PATCH] Add pixel buffer to sprite bounds

---
 src/commands/extract.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/commands/extract.rs b/src/commands/extract.rs
index 4a0c006..4daaf95 100644
--- a/src/commands/extract.rs
+++ b/src/commands/extract.rs
@@ -40,10 +40,10 @@ struct BlobBounds {
 
 impl BlobBounds {
 	pub fn width(&self) -> u32 {
-		self.right.saturating_sub(self.left)
+		(self.right + 1).saturating_sub(self.left)
 	}
 	pub fn height(&self) -> u32 {
-		self.bottom.saturating_sub(self.top)
+		(self.bottom + 1).saturating_sub(self.top)
 	}
 }
 
-- 
GitLab