summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2011-12-03 17:58:55 +0100
committerAlessio Treglia <alessio@debian.org>2011-12-03 17:58:55 +0100
commit7249c8ed3cb0da5185af4ecd2031c483bfc0258a (patch)
treeb53217820b8aadd3b52d6b0d63ee5689103b125c
parentafe4573b20aa385377102902ce658fa088bb44d2 (diff)
Imported Upstream version 3.2.1upstream/3.2.1
-rw-r--r--NEWS4
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
-rw-r--r--src/book-view.c2
-rw-r--r--src/book.c24
-rw-r--r--src/book.vala1
-rw-r--r--src/page-view.c2
-rw-r--r--src/page.c2
-rw-r--r--src/scanner.c2
-rw-r--r--src/simple-scan.c2
-rw-r--r--src/ui.c2
11 files changed, 28 insertions, 17 deletions
diff --git a/NEWS b/NEWS
index 396d94a..697e700 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Overview of changes in simple-scan 3.2.1
+
+ * Fix JPEG compression not working in PDF files
+
Overview of changes in simple-scan 3.2.0
* Version number change only
diff --git a/configure b/configure
index 16b1c15..2970fbe 100755
--- a/configure
+++ b/configure
@@ -2739,7 +2739,7 @@ fi
# Define the identity of the package.
PACKAGE=simple-scan
- VERSION=3.2.0
+ VERSION=3.2.1
cat >>confdefs.h <<_ACEOF
diff --git a/configure.ac b/configure.ac
index bcbf124..ff240b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.ac)
-AM_INIT_AUTOMAKE(simple-scan, 3.2.0)
+AM_INIT_AUTOMAKE(simple-scan, 3.2.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
GNOME_MAINTAINER_MODE_DEFINES
diff --git a/src/book-view.c b/src/book-view.c
index f989d83..d7d52e1 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.13.4, the Vala compiler
+/* book-view.c generated by valac 0.14.0, the Vala compiler
* generated from book-view.vala, do not modify */
/*
diff --git a/src/book.c b/src/book.c
index e7b4b52..32f35e2 100644
--- a/src/book.c
+++ b/src/book.c
@@ -1,4 +1,4 @@
-/* book.c generated by valac 0.13.4, the Vala compiler
+/* book.c generated by valac 0.14.0, the Vala compiler
* generated from book.vala, do not modify */
/*
@@ -959,8 +959,9 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gsize* n_writte
gint _tmp28_;
struct jpeg_destination_mgr _tmp29_;
gint _tmp30_;
- guint8* _tmp31_;
- gint _tmp31__length1;
+ gint _tmp31_ = 0;
+ guint8* _tmp32_;
+ gint _tmp32__length1;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (image != NULL, NULL);
memset (&info, 0, sizeof (struct jpeg_compress_struct));
@@ -1052,12 +1053,17 @@ static guint8* book_compress_jpeg (Book* self, GdkPixbuf* image, gsize* n_writte
_tmp29_ = dest_mgr;
_tmp30_ = _tmp29_.free_in_buffer;
_vala_n_written = (gsize) (_tmp28_ - _tmp30_);
- _tmp31_ = data;
- _tmp31__length1 = data_length1;
+ _tmp31_ = (gint) _vala_n_written;
+ data = g_renew (guint8, data, (gint) _vala_n_written);
+ (_tmp31_ > data_length1) ? memset (data + data_length1, 0, sizeof (guint8) * (_tmp31_ - data_length1)) : NULL;
+ data_length1 = _tmp31_;
+ _data_size_ = _tmp31_;
+ _tmp32_ = data;
+ _tmp32__length1 = data_length1;
if (result_length1) {
- *result_length1 = _tmp31__length1;
+ *result_length1 = _tmp32__length1;
}
- result = _tmp31_;
+ result = _tmp32_;
jpeg_destroy_compress (&info);
if (n_written) {
*n_written = _vala_n_written;
@@ -2805,7 +2811,7 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:529: Error writing PDF: %s", _tmp3_);
+ g_warning ("book.vala:530: Error writing PDF: %s", _tmp3_);
_g_error_free0 (e);
}
__finally0:
@@ -3112,7 +3118,7 @@ static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data,
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:565: Error writing data: %s", _tmp3_);
+ g_warning ("book.vala:566: Error writing data: %s", _tmp3_);
result = CAIRO_STATUS_WRITE_ERROR;
_g_error_free0 (e);
return result;
diff --git a/src/book.vala b/src/book.vala
index 64f7c60..a410264 100644
--- a/src/book.vala
+++ b/src/book.vala
@@ -197,6 +197,7 @@ public class Book
}
info.finish_compress ();
n_written = max_length - dest_mgr.free_in_buffer;
+ data.resize ((int) n_written);
return data;
}
diff --git a/src/page-view.c b/src/page-view.c
index 24bc20d..6ee1096 100644
--- a/src/page-view.c
+++ b/src/page-view.c
@@ -1,4 +1,4 @@
-/* page-view.c generated by valac 0.13.4, the Vala compiler
+/* page-view.c generated by valac 0.14.0, the Vala compiler
* generated from page-view.vala, do not modify */
/*
diff --git a/src/page.c b/src/page.c
index eec34df..96bbc17 100644
--- a/src/page.c
+++ b/src/page.c
@@ -1,4 +1,4 @@
-/* page.c generated by valac 0.13.4, the Vala compiler
+/* page.c generated by valac 0.14.0, the Vala compiler
* generated from page.vala, do not modify */
/*
diff --git a/src/scanner.c b/src/scanner.c
index fc0fb07..ff756ec 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1,4 +1,4 @@
-/* scanner.c generated by valac 0.13.4, the Vala compiler
+/* scanner.c generated by valac 0.14.0, the Vala compiler
* generated from scanner.vala, do not modify */
/*
diff --git a/src/simple-scan.c b/src/simple-scan.c
index 21dc633..9ca5f9c 100644
--- a/src/simple-scan.c
+++ b/src/simple-scan.c
@@ -1,4 +1,4 @@
-/* simple-scan.c generated by valac 0.13.4, the Vala compiler
+/* simple-scan.c generated by valac 0.14.0, the Vala compiler
* generated from simple-scan.vala, do not modify */
/*
diff --git a/src/ui.c b/src/ui.c
index 8f9003c..122b1d4 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1,4 +1,4 @@
-/* ui.c generated by valac 0.13.4, the Vala compiler
+/* ui.c generated by valac 0.14.0, the Vala compiler
* generated from ui.vala, do not modify */
/*