diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-15 10:16:00 +0200 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-15 10:18:00 +0200 |
commit | a66b6a69ff903310ceb0f6618cbf94d480fbeae6 (patch) | |
tree | 86ea5a950ef2e16b91d79137052db7570d80310d | |
parent | aca9c3d518049ff2eda537773186aa5b162d6f53 (diff) |
Don't log and error in case sizeof(SplashColor) != 3
In poppler, sizeof(SplashColor) si always 4, while in xpdf depends on
whether it's built with cmyk support. I think it's safe to simply check
that sizeof(SplashColor) is at least 3.
-rw-r--r-- | lib/pdf/BitmapOutputDev.cc | 4 | ||||
-rw-r--r-- | lib/pdf/FullBitmapOutputDev.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 97c03f86..11fa842f 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -182,8 +182,8 @@ void BitmapOutputDev::flushBitmap() int bitmap_width = rgbdev->getBitmapWidth(); int bitmap_height = rgbdev->getBitmapHeight(); - if(sizeof(SplashColor)!=3) { - msg("<error> sizeof(SplashColor)!=3"); + if(sizeof(SplashColor)<3) { + msg("<error> sizeof(SplashColor)<3"); return; } diff --git a/lib/pdf/FullBitmapOutputDev.cc b/lib/pdf/FullBitmapOutputDev.cc index e05134c1..b9efc8e5 100644 --- a/lib/pdf/FullBitmapOutputDev.cc +++ b/lib/pdf/FullBitmapOutputDev.cc @@ -130,8 +130,8 @@ void FullBitmapOutputDev::flushBitmap() if((xmax-xmin)<=0 || (ymax-ymin)<=0) // no bitmap, nothing to do return; - if(sizeof(SplashColor)!=3) { - msg("<error> sizeof(SplashColor)!=3"); + if(sizeof(SplashColor)<3) { + msg("<error> sizeof(SplashColor)<3"); return; } //xmin = ymin = 0; |