about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2022-12-24 02:37:30 -0600
committerGenny <gen@nyble.dev>2022-12-24 02:37:30 -0600
commitc4ede682ec9cc43651c1a19682d0102b7886bb98 (patch)
treeb8266e54684166c884b62937795483374d7b9103
parent1a5542b325e945f93336920ee0813ee0aa57ac7c (diff)
downloadgifed-c4ede682ec9cc43651c1a19682d0102b7886bb98.tar.gz
gifed-c4ede682ec9cc43651c1a19682d0102b7886bb98.zip
MCS must be 2
-rw-r--r--gifed/src/block/indexedimage.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/gifed/src/block/indexedimage.rs b/gifed/src/block/indexedimage.rs
index 64b251e..ea99914 100644
--- a/gifed/src/block/indexedimage.rs
+++ b/gifed/src/block/indexedimage.rs
@@ -46,6 +46,8 @@ impl IndexedImage {
 			},
 		};
 
+		let mcs = if mcs < 2 { 2 } else { mcs };
+
 		//FIXME: gen- This seems  broken
 		//let compressed = LZW::encode(mcs, &self.indicies);
 		let compressed = Encoder::new(weezl::BitOrder::Lsb, mcs)