[podsleuth] Respect AlignRowBytes image spec (BGO #554633)
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [podsleuth] Respect AlignRowBytes image spec (BGO #554633)
- Date: Wed, 1 Jul 2009 02:34:19 +0000 (UTC)
commit 53947c80cc22f06ff78eff529fa315eea951bdc5
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Jun 30 21:32:11 2009 -0500
Respect AlignRowBytes image spec (BGO #554633)
src/PodSleuth/PodSleuth/ImageFormat.cs | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/PodSleuth/PodSleuth/ImageFormat.cs b/src/PodSleuth/PodSleuth/ImageFormat.cs
index 64fb694..6ff123d 100644
--- a/src/PodSleuth/PodSleuth/ImageFormat.cs
+++ b/src/PodSleuth/PodSleuth/ImageFormat.cs
@@ -29,6 +29,12 @@ namespace PodSleuth
correlation_id = ((PlistInteger)format["FormatId"]).Value;
width = ((PlistInteger)format["RenderWidth"]).Value;
height = ((PlistInteger)format["RenderHeight"]).Value;
+
+ try {
+ if (format.ContainsKey ("AlignRowBytes") && ((PlistBoolean)format["AlignRowBytes"]).Value && (width % 2) != 0) {
+ width = height = width + 1;
+ }
+ } catch {}
if(format.ContainsKey("Rotation")) {
rotation = ((PlistInteger)format["Rotation"]).Value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]